<?
$sql = mysql_query("SELECT id,id_user, COUNT(m) AS mcount FROM user WHERE id_user = 1 AND m = 0 GROUP BY id_user HAVING COUNT(m)>=2");
if(mysql_query($sql) && mysql_num_rows($sql)>=2)
{
echo 'Найдено записей — '.mysql_result($sql,0,"mcount");
}
else echo 'Не найдено ни одной записи';
?>
Изменил: Олег (28.08.2010 / 12:57)