Hello, i'm having some problem when comparing date (from user input) with the date inside database. The format of both dates are the same (YYYY-MM-DD). This is the error it shows
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 'WHERE
date
= 2012-08-30' at line 1
and the code
mysql_query("INSERT INTO $attlist ($tempName
) VALUES ($tempValue) WHERE date
= '$date' ") or die(mysql_error());
Really appreciate your help. Thanks