您的SQL語法錯誤;檢查對應於你的MySQL服務器版本正確的語法在1號線
查詢作品使用近「」,但錯誤報告「臭蟲」我:)
//the vars i use
$pos = $_POST['positie']; //this can be B1 till M100
$kolom = $pos[0]; //get first char of the $pos string
$rij = substr($pos, 1, 3); //get the rest of the chars
$sql= mysql_query("UPDATE floorplan SET available='0' WHERE kolom='$kolom' AND rij='$rij'") or die(mysql_error());
的kolom是手動varchar(4),rij是int(4)並且可用是BOOLEAN。
什麼是**價值**的$ kolom? –
可能的重複[最好的方法來防止SQL注入?](http://stackoverflow.com/questions/60174/best-way-to-prevent-sql-injection) –
夥計。 **檢查你的輸入!! ** – Rijk