this is my php code
$sql="SELECT * FROM table_name WHERE FROM_UNIXTIME(date, '%Y') = $q order by id desc";
$q = mysql_query($sql) or die(mysql_error().$sql);
$sql1="SELECT * FROM table_name WHERE FROM_UNIXTIME(date, '%Y') = $q";
$query=mysql_query($sql1);
this gathers the results correctly (everything is correct)
but when i use this to calculate the total results it gives me nothing, however i had for example 3 results:
$total = mysql_num_rows($query);