SQL syntax issues in PHP _php tutorial

Source: Internet
Author: User
Question
SQL syntax issues in PHP
Answer
The PHP I just learned today is a tutorial at Zhongyuan University.
Now I'm writing that counter and I'm having a problem.
The insert command given by phpMyAdmin is this
$sql = ' INSERT into ' test '. ' Counter ' (' new ') VALUES (' 1 ') ';
But I write to the PHP file in error, must be changed to
$sql = ' INSERT into ' test '. ' Counter ' (' new ') VALUES (1) ';
is to put the 1 quotation marks.
I see there are quotes in the video, why can't I have quotation marks?

I'll answer that.




User Answer
Quotes escaped under

User Answer
You see, the most out of the video is double quotes. [Img]http://www.111cn.cn/bbs/images/smilies/default/loveliness.gif[/img]

User Answer
$sql = "INSERT into ' test '. ' Counter ' (' new ') VALUES (' 1 ')";

User Answer
That tutorial is too old.

User Answer
Originally Posted by fanglq04 on 2009-4-7 11:04 [url=http://www.111cn.cn/bbs/redirect.php?goto=findpost&pid=939091&ptid= 111565] link marker [Img]http://www.111cn.cn/bbs/images/common/back.gif[/img][/url]
That tutorial is too old.
I also think it's a version problem, it seems like I've met


http://www.bkjia.com/PHPjc/632573.html www.bkjia.com true http://www.bkjia.com/PHPjc/632573.html techarticle answers to SQL syntax questions in PHP today, PHP is looking at Zhongyuan University that tutorial is now writing that counter, encountered a problem phpmyadmin given the insertion command 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.