469,890 Members | 1,600 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

How to get existence of ads by publisher in same query

I want to show all info about publishers in rows (1 row/publisher) and then
I want to show a link after those publishers who have ads in our service.
This all should be done in same querys



Something like this

SELECT publisher_id, ... , some function to count number (0...N) or
existence (0/1) of ads connected to certain publisher
FROM publishers
LEFT OUTER JOIN ads ON publisher_id_ =ad_publisher_id
GROUP BY publisher id

- perttu p, finland
Jul 20 '05 #1
0 953

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by pemigh | last post: by
reply views Thread by Ron | last post: by
7 posts views Thread by Adrian | last post: by
9 posts views Thread by =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.