Comparing 2 datetime in mysql
Posted: Sat Jul 04, 2009 4:38 pm
I have one table called member, and i have 2 column called date and date1
how i can substract the 2 of them, date1-date > 0??
i tried TIMEDIFF, but could not make it, because nothing happened in my server
if($dateasd =mysql_query("SELECT * TIMEDIFF ('date1', 'date') FROM member")>0)
{
$login=0;
}
is there something wrong in how i define the variable?
how i can substract the 2 of them, date1-date > 0??
i tried TIMEDIFF, but could not make it, because nothing happened in my server
if($dateasd =mysql_query("SELECT * TIMEDIFF ('date1', 'date') FROM member")>0)
{
$login=0;
}
is there something wrong in how i define the variable?