RE: [PHP-DB] sql querry problem

From: Date: Fri, 03 May 2002 18:19:18 +0000
Subject: RE: [PHP-DB] sql querry problem
Groups: php.db 
Request: Send a blank email to php-db+get-18970@lists.php.net to get a copy of this message
That too... :-) You'll have to do two deletes, if your referential integrity is set up you'll have to delete the children before you can delete the parent as well. Thanks Szii.. I missed that part. <>< Ryan -----Original Message----- From: szii@sziisoft.com [mailto:szii@sziisoft.com] Sent: Friday, May 03, 2002 11:48 AM To: andy Cc: php-db@lists.php.net Subject: Re: [PHP-DB] sql querry problem "Delete from" does not work with multiple tables, AFAIK.. -Szii ----- Original Message ----- From: "andy" <news.letters@gmx.de> To: <php-db@lists.php.net> Sent: Friday, May 03, 2002 2:02 AM Subject: [PHP-DB] sql querry problem > Hi there, > > I do have 2 tables. One contains an update for the other one. Before > inserting I would like to delete all the entries in the old table containing > the same country_code like one in the new table. > > I tryed: > > delete o.* > from Cities_update_imported n, test.cities o > where n.country_code = o.country_code > > But does not work though:-( > > can anybody help on that? > > thanx, Andy > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18970) next »