Selecting by dates
Posted: Wed Mar 29, 2006 5:53 am
Hi I have a field in my records thats holds the last login date of a user, its default is set up as 0000-00-00
what I want to do is query all my users records to find out how many people have logged in, i.e. do not have a value of 0000-00-00
Have tried the following query but am getting an error, any ideas??
thanks in advance
what I want to do is query all my users records to find out how many people have logged in, i.e. do not have a value of 0000-00-00
Have tried the following query but am getting an error, any ideas??
Code: Select all
$result = mysql_query("Select count(*) AS number where MONTH(last_login) = '00'") or die(mysql_error());thanks in advance