I have a table in mysql that stores messages sent. The table uses int(10) for a timestamp that is set by php when a message is sent.
Time stamps look like this: 1141154900
I need to do something like:
SELECT * FROM message_table WHERE timestamp = todays date (date only not time) AND userid = $current_user
if(result num rows > 5) exit....
The purpose is to select all messages sent by user today (within 24 hours) and if results greater than 5, to exit;
How do I go about comparing todays date against timestamp rows in a table?
Any help from you guru's would be greatly appreciated!
Thank you.