Took me a minute to figure out what you are trying to do, but I think I have
it now.

Try this.

$result = "SELECT  ptype, count(*) FROM mylist_slave WHERE and
user='".$my_user."' and cno='".$my_ccno."' GROUP BY ptype";

this will return you the number of rows that is the same number of packages
they have setup.

Jim Lucas

----- Original Message -----
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 8:26 PM
Subject: [PHP] multiple count (*) from php? (last one got sent in error,
this is the correct one)


> Hi,
> I have 5 tables which keep th details for 5 packages for a company...
> a company may add however many packages they wish.
>
> When a company logs in I want to be able to tell them:
>
> you have $numberOfPackages entered:
> package1 $one
> package2 $two
> package3 $three
> package4 $four
> package5 $five
>
> instead of running 5 "$result = "SELECT  count(*) FROM mylist_slave WHERE
> ptype =$inn  and user='".$my_user."' and cno='".$my_ccno."'";
>
> is there any any way to select all 5 differient tables in one select
> count(*) statement?
>
> Thanks,
> -Ryan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to