multivac, Thursday, July 04, 2002, 12:22:42 AM, you wrote: m> I'm quite new in MySQL and PHP, so I guess my question is stupide. Sorry m> for that but I really need the solution...
m> I have 2 tables [skip] m> The primary Keys are ClientID on table Client and CommandID on table m> Command. m> I'm looking for a way to be sure that when deleting an entry in Client m> table, all the corresponding entries in Command table are deleted m> without sending a specific request for that. m> It seems that in SQL a froreign key is the solution but the MySQL m> documentation says that foreign keys aren't implemented in MySQL, so how m> to solve this elementary issue ? Foreign keys are implemented in MySQL since 3.23.44b. ON DELETE CASCADE are supported since 3.23.50. But if you want to use foreign key constraints and ON CASCADE DELETe you must use InnoDB tables for that. http://www.mysql.com/doc/S/E/SEC446.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php