Php programming connection to the database to read data tables problem my database has multiple data tables, only the table order cannot read can only print 111
Any other table can print 222
I don't know what's wrong with QAQ
Shopping cart No.: $ row [cartNo] Customer No.: $ row [cusNo] product No.: $ row [proNo] purchase date: $ row [cartDate] purchase amount: $ row [cartSum] shipping address: $ row [cartAddress]
"; Echo"
";?>
Reply to discussion (solution)
The easiest part here is to display order records at the end !!!! The order table cannot be read !!!! Please help me !!! I really don't have any questions. QAQ
Below are my data tables and databases
$ Query = mysql_query ("select * from order ");
Order is ?? Word
Change
$ Query = mysql_query ("select * from 'Order "');
You can.
Which? Do not use table names ?? Word ratio? Okay. Can I use orders? .
$query=mysql_query("select * from `order` ");
I know that the table name cannot use keywords.
However, if you have a keyword, you must use.
Only the table order cannot be read. only 111 rows can be printed.
Any other table can print 222. In fact, you already know the problem from your description, that is, the order table problem. what is the problem? like the keyword order, so change the table name or 'order'
$ Query = mysql_query ("select * from order") or die (mysql_error ());
I don't know what the prompt is.
Mysql reserved word http://www.cnblogs.com/lawdong/archive/2010/08/08/2357903.html
Do not escape any reserved words when they are used as other words: enclose them''
The following reserved words can be used as exceptions:
ACTION
BIT
DATE
ENUM
NO
TEXT
TIME
TIMESTAMP
It turned out to be a keyword issue. thank you all. I know it has been changed ~~~~