JohnnyLee
02-23-2012, 04:35 PM
i'm trying to move/migrate old web application for a client of mine to latest versions of MySQL and PHP.
i'm having problems fixing this error:
There was a problem adding the initial timeframe to the database. Please inform the System Administrator. Insert failed
There was a problem logging this transaction. Please print out this page and inform the System Administrator.
Insert failed : INSERT INTO log VALUES( 0, "2012-02-23 16:22:41", "job", , "root", "1005,380,\'open\',\'2012-02-23 16:22:41\',\'root\',\'2012-02-23 16:22:41\',\'root\',\'\',\'lab\',\'\'", "added")
the code behind this is this:
$insert_t0 = mysql_db_query("databaseName", "INSERT INTO timeframe VALUES (0,$new_int_job_no,\"T0\",1)")
or print ("<p><font face=\"Verdana, Arial, Helvetica, sans-serif\">There was a problem adding the initial timeframe to the database. Please inform the System Administrator. Insert failed\n</font>\n");
$added_data = "$cust_to_edit,$new_job_no,\'open\',\'$datetimenow\',\'$login\',\'$datetimenow\',\'$login\',\'$jobini t_ponum\',\'lab\',\'\'";
$query = "INSERT INTO log VALUES(
0,
\"$datetimenow\",
\"job\",
$new_int_job_no,
\"$login\",
\"".$added_data."\",
\"added\")";
i'm guessing this is something to do with the SQL syntax.
any help would be much appreciated
Johnny
i'm having problems fixing this error:
There was a problem adding the initial timeframe to the database. Please inform the System Administrator. Insert failed
There was a problem logging this transaction. Please print out this page and inform the System Administrator.
Insert failed : INSERT INTO log VALUES( 0, "2012-02-23 16:22:41", "job", , "root", "1005,380,\'open\',\'2012-02-23 16:22:41\',\'root\',\'2012-02-23 16:22:41\',\'root\',\'\',\'lab\',\'\'", "added")
the code behind this is this:
$insert_t0 = mysql_db_query("databaseName", "INSERT INTO timeframe VALUES (0,$new_int_job_no,\"T0\",1)")
or print ("<p><font face=\"Verdana, Arial, Helvetica, sans-serif\">There was a problem adding the initial timeframe to the database. Please inform the System Administrator. Insert failed\n</font>\n");
$added_data = "$cust_to_edit,$new_job_no,\'open\',\'$datetimenow\',\'$login\',\'$datetimenow\',\'$login\',\'$jobini t_ponum\',\'lab\',\'\'";
$query = "INSERT INTO log VALUES(
0,
\"$datetimenow\",
\"job\",
$new_int_job_no,
\"$login\",
\"".$added_data."\",
\"added\")";
i'm guessing this is something to do with the SQL syntax.
any help would be much appreciated
Johnny