I keep getting an error that says: 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 'task, 120, 1187931600, 1187845200, 3, 60)' at line 1
Here is my Code. The variables have been defined and used earlier in the page.
$query = "INSERT INTO task (user_id, task_name, time_estimate, due_date, start_date, priority, wanted_time) VALUES ('0', $task_name, $total_time, $due_date, $start_date, $priority, $want_time)";
$result = mysql_query($query)
or die (mysql_error());
One note is that These are not all of the feilds in my table. I have one that is task_id that is suppose to auto-increment. Does it do that automatically? Or do I need to put something in my code for that?
I also have a parent_id feild that is set so that it can be null.
I can't find my error, but then again, I just started programming this. Can someone help me? THANKs!!