How to display?
| From: | Ryan A | Date: | Fri, 08 Aug 2003 22:06:10 +0000 |
| Subject: | How to display? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158959@lists.php.net to get a copy of this message | ||
Hi,
I am running a pretty simple statement (thanks to ben from the list) that i
have already checked via phpmyadmin, but i dont know how to display it....
eg:
$tt = "SELECT COUNT(*), 'Count1' FROM shared WHERE user
='".$my_user."' and
cno=".$mmy_cno." UNION
SELECT COUNT(*), 'Count2' FROM dedicated where user='".$my_user."' and
cno=".$mmy_cno." UNION
SELECT COUNT(*), 'Count3' FROM reseller WHERE user ='".$my_user."'
and
cno=".$mmy_cno." UNION
SELECT COUNT(*), 'Count4' FROM colocated WHERE user ='".$my_user."'
and
cno=".$mmy_cno." UNION
SELECT COUNT(*), 'Count5' FROM freehosting WHERE user ='".$my_user."'
and
cno=".$mmy_cno;
$res = mysql_query($tt);
now how do i display the results?
I have tried:
echo $tt;
echo $tt[1];
echo $res;
echo $res[1];
print_r(array_values ($res));
print_r(array_values ($tt));
and a lot more combinations...but no use...
what am i doing wrong?
Kindly reply,
-Ryan
We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com