$time = time()-24*60*60; $all = mysql_num_rows(mysql_query("SELECT * FROM `table` WHERE `createtime`>$time"); echo "+$all";