laura81
10-04-2008, 02:26 PM
Hello!
I have a problem with my sql query. The query itself is following:
$result=dbquery("INSERT INTO ".$db_prefix."table1 VALUES('', $data_group_id, $data_contact_id, $data_code, $data_name, $data_status)");
When I execute it, it doesn't add records to database and shows error like this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' OK, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,' at line 1
I have checked that all my database fields exist in the right order, database fields are all text or varchar.
I have used queries like that lots of times, but have never had any errors. :(
Where could I start solving the problem?
Thank you in advance,
Laura :)
I have a problem with my sql query. The query itself is following:
$result=dbquery("INSERT INTO ".$db_prefix."table1 VALUES('', $data_group_id, $data_contact_id, $data_code, $data_name, $data_status)");
When I execute it, it doesn't add records to database and shows error like this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' OK, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,' at line 1
I have checked that all my database fields exist in the right order, database fields are all text or varchar.
I have used queries like that lots of times, but have never had any errors. :(
Where could I start solving the problem?
Thank you in advance,
Laura :)