markbaron15
07-22-2012, 07:05 AM
I just want to ask if anything wrong with my query?
im using
MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
and PHP Version 5.3.5
[CODE]
if (!executeQuery("insert into studenttest values(" . $_SESSION['stdid'] . "," . $_SESSION['testid'] . ",(select CURRENT_TIMESTAMP),date_add((select CURRENT_TIMESTAMP),INTERVAL (select duration from test where testid=" . $_SESSION['testid'] . ") MINUTE),0,'inprogress')"))
[CODE]
it still gives me an error
"errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1)),(select CURRENT_TIMESTAMP),date_add((select CURRENT_TIMESTAMP),INTERVAL (sel' at line 1"
Im inserting a stdid(a primary key from table `users`) into table `studenttest`.
Please help.
im using
MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
and PHP Version 5.3.5
[CODE]
if (!executeQuery("insert into studenttest values(" . $_SESSION['stdid'] . "," . $_SESSION['testid'] . ",(select CURRENT_TIMESTAMP),date_add((select CURRENT_TIMESTAMP),INTERVAL (select duration from test where testid=" . $_SESSION['testid'] . ") MINUTE),0,'inprogress')"))
[CODE]
it still gives me an error
"errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1)),(select CURRENT_TIMESTAMP),date_add((select CURRENT_TIMESTAMP),INTERVAL (sel' at line 1"
Im inserting a stdid(a primary key from table `users`) into table `studenttest`.
Please help.