RE: [PHP] Delete a record

From: Date: Fri, 13 Sep 2002 21:53:20 +0000
Subject: RE: [PHP] Delete a record
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116320@lists.php.net to get a copy of this message
Christian Ista <mailto:Christian.ista@teledisnet.be> scribbled; > > Hello, > > I'd like delete some row from a table. > > I do that : > > $query="DELETE FROM logiciellg WHERE LOGICIEL_ID=$ID"; > $result = mysql_query($query) or die ("Invalid query"); > > when I look the query via an echo the query look ok. But when I > execute (mysql_query) I receive "Invalid query". > > Could you tell me why ? > Assuming $ID is valid, and your DB is setup with that table and row, and that you've selected the right DB,I'd say to die("invalid query: ".mysql_error()) to get more information.. -jesse

« previous php.general (#116320) next »