Well, i have the line
$datecheck = date('Y-m-d');
$checking = mysql_query("SELECT * FROM $log WHERE date= '$datecheck'
it worked fine when the date in the database was the same as $datecheck
but i changed it to DATETIME lately so it also has the time stored.
what can i do to compare just the y-m-d without the time?
I assume data time is in this format YYYY/MM/DD HH:MM:SS so
The MySQL manual is a wonderful source of answers for such questions:
Check out DATE_FORMAT - it's the answer to your question.
Or just use DATE() on the mysql datetime column, and it'll return just the date.