i have this query:
SELECT DISTINCT p.unitid,s.name,p.type
FROM myplan_schools s, myplan_school_program_assoc p
WHERE s.unitid IN (110635,110644,201885) AND s.unitid=p.unitid
ORDER BY s.name ASC
LIMIT 0,10
it returns the records i am interested in and limits the number of records returned so my PHP page isn't enormous. I have a previous/next button thing set up which alters the LIMIT clause so users can page thru all the records.
I want to know how many records would have been returned without the LIMIT clause so i can display "Record 1-10 of X". Is it possible to combine COUNT and DISTINCT in a query?