小弟在執行php網頁的時候,出現下面錯誤訊息
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 'leave WHERE level=2 and id='tom'' at line 1
那我回去查原來的程式碼為
<?php
mysql_select_db($database_admin, $admin);
$query_Recordset2 = "SELECT * FROM leave WHERE level=2 and id=$PHP_AUTH_USER ";
$Recordset2 = mysql_query($query_Recordset2, $admin) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
不曉得出什麼問題ㄟ,請教各位前輩
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.19.142.253