回文章列表
作者expand.bbs@ptt.cc (微微暖風��N�� ��N�� ) 看板: linux
標題[問題]php+mysql的問題
時間批踢踢實業 (2008/04/15 Tue 16:56:25)
    小弟在執行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
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻