SQL syntax in PHP _ PHP Tutorial

Source: Internet
Author: User
SQL syntax in PHP. Q & A: The SQL syntax in PHP. the answer to the question I just learned today is that the tutorial of the Central Plains University is currently writing the counter. if you have a problem, the insert command provided by phpmyadmin is this Q &.
SQL syntax in PHP
Answer
The php I just learned today is the tutorial from the Central Plains University.
The counter is being written, and a problem occurs.
The insert command provided by phpmyadmin is
$ SQL = 'Insert INTO 'test'. 'counter' ('New') VALUES ('1 ')';
But an error is reported when I write it to the PHP file. it must be changed
$ SQL = 'Insert INTO 'test'. 'counter' ('New') VALUES (1 )';
The quotation mark of 1 is removed.
I watched the video with quotation marks. Why can't I use quotation marks?

Let me answer




Answers from netizens
Escape with quotation marks

Answers from netizens
You can see that the outermost side of the video is double quotation marks instead of [img] http://www.111cn.cn/bbs/images/smilies/default/loveliness.gif#/img].

Answers from netizens
$ SQL = "INSERT INTO 'test'. 'counter' ('New') VALUES ('1 ')";

Answers from netizens
That tutorial is too old.

Answers from netizens
The original post published by fanglq04 at [url = http://www.111cn.cn/bbs/redirect.php? Goto = findpost & pid = 939091 & ptid = 111565] link Mark [img] http://www.111cn.cn/bbs/images/common/back.gif?/img=#/url]
That tutorial is too old.
I also think it is a version Issue. it seems that I have encountered


The answer to the SQL syntax questions in PHP today I just learned is that the tutorial of the Central Plains University is now writing that counter. The insertion command provided by phpmyadmin is this...

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.