$total_in_chat = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `palce`='achat' AND `lastdate`>".(time() - 300)), 0); echo 'В чате: '.$total_in_chat.' человек!';