Hi,
I have a table called the_slave where i am entering differient types of data
and 5 specific "types", to get a count of each of the types i used:
$tt = "SELECT ptype, count(*) FROM the_slave WHERE ptype IN ('1', '2',
'3','4','5') and user='".$user."' and no='".$no."' GROUP BY ptype";
then to dump them into variables that I could use anywhere in the page, i
used:
if($res = mysql_query($tt))
{
$x = 1;
while($row = mysql_fetch_row($res))
{ $var[$x++] = $row[1]; }
}
In this way I could use it like: "Hello and welcome, you have: $var[1] of
type 1" etc
now i am facing a new problem, I need to do the same as above but from 5
differient tables (tabl1,tabl2,tabl3,tabl4 and tabl5) I can of course run 5
select/count queries but is there a way to run just one and get the same
effect? I will need to dump it into an arrar and use it the way i used
$var[]
Any ideas?
Thanks,
-Ryan
We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php