note 96680 added to function.mysql-query

From: Date: Thu, 11 Mar 2010 12:14:39 +0000
Subject: note 96680 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-166899@lists.php.net to get a copy of this message
Sorry for this but i really cant see what is wrong with it... This piece of code : $insquery=mysql_query("INSERT INTO temp (PARTNO, DESCRIPTIO, LISTPR, WEIGHT, QUANTITY, REPLCODE, CODE3, CODE2, BRAND, PL_YEAR) VALUES ('$tmppart', '$tmpdesc', $tmplist, $kgs, $quantity, '$tmprepl', '$tmpcode3', '$tmpcode2', '$tmpbrand', '$tmppl')"); Produces the following error Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 5.7531, 2, 'R', '', '', 'CAT', '2010A')' at line 2 Checked the variables and they are ok. Mind you some of them are null. Any ideas? ---- Server IP: 69.147.83.197 Probable Submitter: 195.97.106.15 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit -- https://master.php.net/note/edit/96680 Del: integrated -- https://master.php.net/note/delete/96680/integrated Del: useless -- https://master.php.net/note/delete/96680/useless Del: bad code -- https://master.php.net/note/delete/96680/bad+code Del: spam -- https://master.php.net/note/delete/96680/spam Del: non-english -- https://master.php.net/note/delete/96680/non-english Del: in docs -- https://master.php.net/note/delete/96680/in+docs Del: other reasons-- https://master.php.net/note/delete/96680 Reject -- https://master.php.net/note/reject/96680 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166899) next »