I've tried it and it doesnt work. Probably I didn't explain my problem clearly sorry for that.
Here is the situation:
I have a field called event_date in a table called Event.
event_date store the date in timestamp form (eg:1041347340)
That is 1 January 2003 02:09:00
Then in a page I want to display something if lets say the date is 1 January 2003 (no matter what the time is).
It looks like this:
......
if(haveEvent($Day_Counter,$Month,$Year))
printf("PRINTED");
......
function haveEvent($day,$mon,$year)
{
//THIS LINE BELOW IS THE PROBLEM
$timestmp = mktime(0,0,0,$mon,$day,$year);
$result = mysql_query("SELECT * FROM event WHERE event_date='$timestmp'");
if(! $result)
die ("haveEvent fatal error: ".mysql_error());
return mysql_fetch_array($result);
}
But "PRINTED" would not be printed because the hour,minute,second is different.
I tried to debug and change
$timestmp = mktime(2,9,0,$mon,$day,$year);
and it did print PRINTED.
I hope that clarify the situation.
I really appreciate any help.