On Saturday 13 November 2004 06:40 am, Jerry Swanson wrote: > This is my query > select id, status from sale where user_id = 1 GROUP BY id; > > I need to know how many rows or how many entries this query returns. I > tried to use "count" and "sum". But the result is wrong. > > I want to be able to make select and know how many rows this query > returns. Now, I use mysql_num_rows in php,
I'm not sure what you're actually trying to return. If you're using 'Group By', I'd expect an aggregate function to be used in the query.
pgp37IS8RPhXa.pgp
Description: PGP signature