Separate Query for Count

Posted by Anraiki on Stack Overflow See other posts from Stack Overflow or by Anraiki
Published on 2010-04-05T00:13:08Z Indexed on 2010/04/05 0:23 UTC
Read the original article Hit count: 680

Filed under:
|

Hello, I am trying to get my query to grab multiple rows while returning the maximum count of that query.

My query:

SELECT *, COUNT(*) as Max FROM tableA LIMIT 0 , 30

However, it is only outputting 1 record.

I would like to return multiple record as it was the following query:

SELECT * FROM tableA LIMIT 0 , 30

Do I have to use separate queries?

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql