Generating mysql statement from php return an error :-(

From: Date: Mon, 30 Jul 2001 00:47:26 +0000
Subject: Generating mysql statement from php return an error :-(
Groups: php.general 
Request: Send a blank email to php-general+get-60132@lists.php.net to get a copy of this message
Hi, I'm using a table in my session to store my variable to generate later my sql statements. Until now... nothing very weird ! But when I want to generate my sql statement. I've got an error after the first line where I put a comma " ; " to make a difference within my statements. this is a portion of my code : $query.="Insert into product (id_quote,item,description,quantity,unit_price,ext_price,lead) values ('$QUOTE_NUMBER' , '".$TABLE_QUOTE_PRODUCT[$y]["item"]."' , '".$TABLE_QUOTE_PRODUCT[$y]["description"]."', '".$TABLE_QUOTE_PRODUCT[$y]["qty"]."' , '".$TABLE_QUOTE_PRODUCT[$y]["unitprice"]."' , '".$TABLE_QUOTE_PRODUCT[$y]["extprice"]."' , '".$TABLE_QUOTE_PRODUCT[$y]["leadtime"]."');\n"; } $result=mysql_query($query); If I have only one line in my sql and I remove the ; it works. but If I add the ; to separate two sql lines.... error ! Any idea how I can resolve this problem ? Regards, Jacques

« previous php.general (#60132) next »