> 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 publishers and
the books each of them produced.  If you only want the results for one

SELECT count(*) FROM WLPbib WHERE publisherID = '$idtoquery'

should be more than acceptable

Either way you may want to consider indexing this table if you have a fairly
large number of records or will be doing a fair number of these queries on a
regular basis


Craig Vincent

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to