The COUNT function will return the number of rows returned by the query which is what I think you are trying to do. The COUNT function requires a column to count as a parameter, so your query will look something like this:
SELECT COUNT(name) as number_sold
FROM beats
WHERE availability = 'Sold'
AND p_staffid = 1;
Last edited by darkagn; Dec 6th, 2008 at 6:26 pm.
Reputation Points: 395
Solved Threads: 192
Veteran Poster
Offline 1,136 posts
since Aug 2007