I'm trying to get a count of records by combining a search from 2 seperate
tables.

I have both listings and agents as tables. What I need to do is get a
agent, ad count for all the agents listed in agents even if they don't
have any ads in listings.

Here's the query:

select name, count(*) as cnt from agents where name = listings.agent;

I keep getting an error saying unknown table listings but it is
definately there.

TIA,

Ed



---------------------------------------------------------------------
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

Reply via email to