What am I doing wrong?
Posted: Wed Nov 07, 2012 6:48 am
Currently the code below gets an error message:
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 'WHERE id='1'' at line 2
I got almost an identical query call on another page working perfectly. Why isn't this working?
(Sorry for thee vague information writing on my way out)
Regards,
Thomas
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 'WHERE id='1'' at line 2
Code: Select all
include_once("DB_Class.php");
$db = new database();
$mydb = "UPDATE my_research SET bet='" .$bet ."',
WHERE id='" .$id ."'";
$db->dbquery($mydb);(Sorry for thee vague information writing on my way out)
Regards,
Thomas