В общем у меня три разных вывода в счетчиках. Всех их надо плюсонуть, чтобы выводило одним числом. Подскажите как. Вот сами счетчики.
echo "(".mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '0' AND `closed` = '0' AND `read` = '0'", 0)."
(".mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '1' AND `read` = '0'", 0)."
(".mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '2' AND `closed` = '0' AND `user_read` = '1'", 0)."
";
$chet1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '0' AND `read` = '0'"smile, 0);
$chet2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '1' AND `read` = '0'"smile, 0);
$chet3 = mysql_result(mysql_query("SELECT COUNT(*) FROM `tickets` WHERE `type_of_question` = '2' AND `read` = '0'"smile, 0);
$chet1 + $chet2 + $chet3 = $c;
Вывод
echo $c;
<?php
$count = mysql_result(mysql_query("SELECT COUNT(*)
FROM `tickets` WHERE (`type_of_question` = '0' AND `closed` = '0' AND `read` = '0')
OR (`type_of_question` = '1' AND `read` = '0')
OR (`type_of_question` = '2' AND `closed` = '0' AND `user_read` = '1')
", 0);
echo $count;
?>
Попробуй так