Posted by Brian on 11/14/22 11:23
"Brian" <a@b.c> wrote in message
news:WEeGe.3066$n97.404@newsfe1-win.ntli.net...
>
> Stefan wrote:
>
>>>>Read about foreign kyes
>>>
>>> foreign keys in MySQL?
>>
>> Yes supported in InnoDBs. You should have a look at CASCADE ...
>
>
> I might be missing something here, but I have done the following though a
> PHPMyAdmin
> on my server.
>
> ALTER TABLE advertlibrary TYPE = InnoDB
> ALTER TABLE profiles TYPE = InnoDB
> (can't use ENGINE = INNODB as
> ALTER TABLE advertlibrary ADD FOREIGN KEY (filename) REFERENCES profiles
> (filename1)
>
> No errors came back
>
> then I ran
>
> DELETE FROM advertlibrary WHERE filename = '1122246317.jpg'
>
> It deleted it from advertlibrary table but not form the profiles table,
> have i missed something here?
>
> and I tried
>
> ALTER TABLE t2sadvertlibrary ADD FOREIGN KEY (filename) REFERENCES
> t2sprofiles (filename1) ON DELETE CASCADE
>
> then
>
> DELETE FROM advertlibrary WHERE filename = '1122246317.jpg'
>
> Still did not work
I found just found out that the tables types are MyISAM I have tried
running a alter statement to
change them to InnoDB and tried creating a test table and setting the type
to InnoDB at the time
of creation, but has not worked.
Is this my hosting supplier that is blocking this or not supporting it?
Brian
[Back to original message]
|