mysql錯誤_PHP教程

來源:互聯網
上載者:User
mysql錯誤

sql語句
$insert="insert into forum set name='$name',description='$description',order='$order',open='$open'";

錯誤報表
Error: 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 'order='1',open='0'' at line 1

在插入資料庫時,只插入前兩個欄位沒有問題


最佳答案[url=http://www.111cn.cn/bbs/space.php?username=一起的榮耀]連結標記一起的榮耀[/url]
[url=http://www.111cn.cn/bbs/space.php?uid=129958]連結標記[img]http://www.111cn.cn/server/avatar.php?uid=129958&size=small[/img][/url]insert into forum set `name`='administrator',`description`='撒旦撒大師的',`order`='1',`open`='1';
看看

order 是關鍵字
附件: 您所在的使用者組無法下載或查看附件


D8888D回貼內容-------------------------------------------------------
insert into forum set `name`='administrator',`description`='撒旦撒大師的',`order`='1',`open`='1';
看看

order 是關鍵字

D8888D回貼內容-------------------------------------------------------
你把$insert 輸出一下檢查看看

D8888D回貼內容-------------------------------------------------------
insert into forum set name='administrator',description='撒旦撒大師的',order='1',open='1'

D8888D回貼內容-------------------------------------------------------
order='1',open='1'錯誤就出在這兒

D8888D回貼內容-------------------------------------------------------
還真的是語法錯誤: INSERT INTO table_name

VALUES (value1, value2, value3,...)
複製代碼INSERT INTO table_name (column1, column2, column3,...)

VALUES (value1, value2, value3,...)
複製代碼

D8888D回貼內容-------------------------------------------------------
明白了

D8888D回貼內容-------------------------------------------------------
是啥問題呀說下子...

D8888D回貼內容-------------------------------------------------------
order 是關鍵字

D8888D回貼內容-------------------------------------------------------
[img]http://www.111cn.cn/bbs/images/smilies/default/dizzy.gif[/img]


http://www.bkjia.com/PHPjc/632557.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632557.htmlTechArticlemysql錯誤 sql語句 $insert="insert into forum set name='$name',description='$description',order='$order',open='$open'"; 錯誤報表 Error: You have an error in your SQL syntax;...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.