PHP: display in “Today” only, not in “Yesterday” too

tarik01

New Member
\[code\]$today = time() - (3600*24);$Yday = time() - (3600*48);$getMsgsToday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date > $today");$countToday = mysql_num_rows($getMsgsToday);$getMsgsYday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date > $Yday");$countYday = mysql_num_rows($getMsgsYday);\[/code\]This is my code for displaying messages latest 24 hours and 48 hours(yesterday).I got two while for the queries(yesterday and today). Now if you have something within 24 hours, it will also display in the yesterday while().I only wish to show yesterday
 
Back
Top