Forum Moderators: coopster
ISSUE:
The Mysql UNION code works directly with the mysql.exe -direct with db-- but when put in a PHP code, errors out.
$resp = mysql_query("(SELECT account, 'GT' as status, count(ID) as total FROM tblx GROUP BY account HAVING count(ID) > 10) UNION ("(SELECT account, 'LT' as status, count(ID) as total FROM tblx GROUP BY account HAVING count(ID) < 10)");while ($row = mysql_fetch_array($resp)) {
print ("the status is: " . $row{'status'};
}
Any insight?
TIA