Trying to do a simple insert, and this one line is giving me issues. I can’t for the life of me see whats wrong with it. So its gotta be something superbly simple that I need another pair of eyes to notice for me apparently.
mysql_query("INSERT INTO ".MLIST."(email, when) VALUES('".mysql_real_escape_string($_POST['email'])."', '".$timeNow."')") or die(mysql_error());
the error is
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 ”email’, ‘when’) VALUES(‘me@domain.com’, ‘2012-06-11
03:58:55′)’ at line 1
WHENis a keyword – place it inside backticks: