MySQL Error _php tutorial

Source: Internet
Author: User
MySQL Error

SQL statements
$insert = "INSERT INTO forum set name= ' $name ', description= ' $description ', order= ' $order ', open= ' $open '";

Error Reporting
Error:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' order= ' 1 ', open= ' 0 "at Li NE 1

There is no problem inserting only the first two fields when inserting a database


Best answer [url=http://www.111cn.cn/bbs/space.php?username= together with Glory] link tag together glory [/url]
[url=http://www.111cn.cn/bbs/space.php?uid=129958] link marker [img]http://www.111cn.cn/server/avatar.php?uid=129958 &size=small[/img][/url]insert into forum set ' name ' = ' Administrator ', ' description ' = ' Satan master ', ' order ' = ' 1 ', ' open ' = ' 1 ';
Look

Order is a keyword
Attachments: The user group you are in cannot download or view attachments


d8888d Huitie Content-------------------------------------------------------
INSERT INTO forum set ' name ' = ' Administrator ', ' description ' = ' Satan master ', ' order ' = ' 1 ', ' open ' = ' 1 ';
Look

Order is a keyword

d8888d Huitie Content-------------------------------------------------------
You put the $insert out and check it out.

d8888d Huitie Content-------------------------------------------------------
INSERT INTO forum set name= ' Administrator ', description= ' Satan Master ', order= ' 1 ', open= ' 1 '

d8888d Huitie Content-------------------------------------------------------
Order= ' 1 ', open= ' 1 ' ERROR is out here

d8888d Huitie Content-------------------------------------------------------
It's really a syntax error: INSERT into table_name

VALUES (value1, value2, Value3,...)
Copy code INSERT INTO table_name (column1, Column2, Column3,...)

VALUES (value1, value2, Value3,...)
Copy Code

d8888d Huitie Content-------------------------------------------------------
I see

d8888d Huitie Content-------------------------------------------------------
What's the problem?

d8888d Huitie Content-------------------------------------------------------
Order is a keyword

d8888d Huitie Content-------------------------------------------------------
[Img]http://www.111cn.cn/bbs/images/smilies/default/dizzy.gif[/img]


http://www.bkjia.com/PHPjc/632557.html www.bkjia.com true http://www.bkjia.com/PHPjc/632557.html techarticle mysql Error SQL statement $insert = "INSERT INTO forum set name= ' $name ', description= ' $description ', order= ' $order ', open= ' $open ' "; Error Reporting error:you has an error in your SQL syntax; ....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.