Reply to Re: SQL statments advice

Your name:

Reply:


Posted by Brian on 11/14/34 11:23

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

Brian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация