hey guys
I need something similar:
first and foremost, i need all the info about evry customeri have, and then
a count of how may order then have for me. (never got it working)
im guessing something like this
select *,count(*) as orders from C,O group by O.domain having orders>-1
however, this gives me a really strange result:
all the info from both tables, with both (only 2 at the moment) orders in 2
rows
and the same customers info in both of them
what would be the best way to make 15 queryes become 1 big query?
List = "Select * from C";
(gets 14 customers)
do until Liste.EOF (basicly C!ASP)
Orders = "select Count(*) as orders from O where domain=' List("domain") '
";
Regards,
Doc
> >
> > Incredibly difficult.
> >
> > select foo,count(*) as cnt from da_table group by foo having cnt >1;
> >
>
> ahh, I'd be slapping my forehead right now, except I've never used
"having"
>
> Thanks for helping out. :)
>
> Stephen
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php