hi buddy
SELECT DISTINCT brand, docsource, doctype, effect
FROM brands
WHERE brand LIKE 'a%' AND docsource = 'MTM' AND docid NOT LIKE '%3.htm'
UNION
SELECT DISTINCT brand, docsource, doctype, effect
FROM brands
WHERE brand LIKE 'a%' AND docsource = 'cons'
UNION
SELECT DISTINCT brand, docsource, doctype, effect
FROM brands
WHERE brand LIKE 'a%' AND docsource = 'pdr'
ORDER BY brand
I want to return a subset of this query for displaying on a page (using LIMIT 0,100), but also want to know how many records there are in total. Is there a way of doing this without returning all the records and counting them in PHP? I want to minimise the data sent between PHP and MySQL, just for cleanliness.
thanx
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --