123
Guest
COUNT(*) + UNION
$count = mysql_query("
(SELECT COUNT(*) AS count FROM " . DB_PREFIX . "table1 WHERE option LIKE '%$s%')
UNION
(SELECT COUNT(*) AS count FROM " . DB_PREFIX . "table2 WHERE option LIKE '%$s%')
");
echo $count['count'] - выводит только для table1. А table2 почему-то игнорируется.. В чем ошибка?
$count = mysql_query("
(SELECT COUNT(*) AS count FROM " . DB_PREFIX . "table1 WHERE option LIKE '%$s%')
UNION
(SELECT COUNT(*) AS count FROM " . DB_PREFIX . "table2 WHERE option LIKE '%$s%')
");
echo $count['count'] - выводит только для table1. А table2 почему-то игнорируется.. В чем ошибка?