Page 1 of 1
multiple counts
Posted: Wed Feb 23, 2005 6:20 am
by Illusionist
this would be right, right?
Code: Select all
$sql = "SELECT COUNT(t1.*) as t1Count, COUNT(t2.*) as t2Count FROM table1 t1, table2 t2";
Posted: Wed Feb 23, 2005 7:20 am
by feyd
why not try it?
Posted: Wed Feb 23, 2005 7:44 pm
by Illusionist
uhm... I was asking if it would work? Can you do multiple counts like that? I haven't seen it done anywhere so i was curious. And i'm not at a computer or place that i can try it...
Posted: Thu Feb 24, 2005 1:29 am
by smpdawg
No.
Posted: Thu Feb 24, 2005 8:27 am
by timvw
for Illusionist:
meaby you should read (and try to understand) a decent introduction to sql first... and then you can start wondering how much sense it makes....
hint: count is a set-function.