At the beginning I was thinking Java or PHP to learn, people told me PHP is easier .. but with time I don’t believe they were right, sometimes it takes one day to find the problem.. here comes an example.
My sql query works in PhpMyAdmin, but not in PHP script, any idea how is that possible (with explanation plz)?
[code=php]$q_insert_t = “INSERT INTO tbl_test (test, type, good)
VALUES (‘$test’, ‘$type’, ‘$good’)
INSERT into t_evaluate (id_test, evaluation, language)
VALUES (LAST_INSERT_ID(), ‘$evaluation’, ‘1’);”;
$good (boolean)
$language (english: 1 of french: 2)
Error it’s giving:
[QUOTE]
[SIZE=”2″][COLOR=”Red”]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 ‘INSERT into t_evaluate (id_test, evaluation, language) VALUES (LAST_INSERT_’ at line 3
Kinds,