RE: [PHP-DB] Counting Number of Instances in a One2Many Relationships

2001-07-24 Thread Craig Vincent
> I'd like a simple query to determine how MANY books in a > database are released by A publisher. [...] > The relevant table's here: > Suggestions are appreciated! SELECT publisherID,count(*) FROM WLPbib GROUP BY publisherID; That query is only acceptable if you want a list of all the pu

RE: [PHP-DB] Counting Number of Instances in a One2Many Relationships

2001-07-24 Thread Brian Dunworth
On Monday, July 23, 2001 at 9:54 PM (ahem, set your clock!), Mike Gifford said: > I'd like a simple query to determine how MANY books in a > database are released by A publisher. [...] > The relevant table's here: > > CREATE TABLE WLPbib ( > bibID mediumint(9) NOT NULL, > languageID

Re: [PHP-DB] Counting Number of Instances in a One2Many Relationships

2001-07-23 Thread Mike Gifford
Hi Paul (both of you), Thanks for your suggestions: Paul DuBois wrote: SELECT publisherID, COUNT(*) FROM WLPpublisher GROUP BY publisherID Paul Burney wrote: SELECT COUNT(bibID) FROM bookDB WHERE publisherID='$your_publisher_id'; And the final code that did the trick was actually a combination