PHP Programming Connection database read data table problem

Source: Internet
Author: User
My database has more than one data table, only the table order cannot read can only print out 111
Any other table can be printed out 222
I don't know what's wrong qaq
   
 
  Shopping cart Number: $row [Cartno] Customer code: $row [Cusno] SKU: $row [Prono] buy time: $row [cartdate] purchase amount: $row [cartsum] delivery address: $row [cartaddress]


"; Echo

"; ? >


Reply to discussion (solution)

Really do the last show order record here the easiest part AH!!! Can't even read the order form!!!! Please help me to see!!! I can't think of anything wrong qaq
Here is my data sheet and database

$query =mysql_query ("SELECT * from order");
Order is?? Word
Change into
$query =mysql_query ("SELECT * from ' order ');
You can do it.

The name of the table is generally not used?? The word ratio is good, can be done with orders?

$query =mysql_query ("SELECT * from ' order ');

The table name cannot use the keyword this I know
But when you have a keyword, you need to "get up."

Only the table order cannot be read only 111 printed
Any other table can be printed out 222 actually, from your description you already know the problem is, is the order table problem, what problem, and the keyword order, so change the table name, or ' order '

$query =mysql_query ("SELECT * from order") or Die (Mysql_error ());
You know what you're suggesting.

MySQL reserved word http://www.cnblogs.com/lawdong/archive/2010/08/08/2357903.html
It is not necessary to escape any reserved word when it is used: "Enclosed
However, the following reserved words can be the exception:
ACTION
BIT
DATE
Enum
NO
TEXT
Time
TIMESTAMP

It's a question of the keyword thank you guys I know it's been changed ~ ~ ~

  • Related Article

    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.