I’m a newbie learning php and here’s a wierd issue for me.
I created a table named order, which have only 1 column: a int(1) (primary key, auto increment) (it had more columns before, I have changed the struture, but would that be a problem?)
when I try to insert data using:
$db=mysql_connect('localhost','root','');
mysql_select_db('workroom',$db);
$sql = "insert into abc values (null)";
mysql_query($sql,$db);
nothing happened for the db.
But when I change the table name “order” to “abc”(or any other names, and update $sql), the insert function works.
Could anyone help me? Thanks a lot.
Thanks again,
Sean
I’m still very new to PHP, but I believe order is a command for MySQL. So, to get past this error you need to include “ around your TableName or change your table name.
This might work for you.
FYI, The “ key is above “tab” key on the keyboard.