Re: urgent: Trying to get COUNT for fairly elaborate query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sneakyimp wrote:
See this query?  I need a separate query that will return ONLY the total
record count that it would come up with.  I've tried replacing the select
part with COUNT() but I still get a series of records in my return result. I just need ONE return value -- the total COUNT of rows returned by this
query originally.

Doing this is actually rather easy.

Replace this:

SELECT e.id, e.title, e.subheading, eta.start_timestamp, eta.end_timestamp, e.zip, e.bold, e.outline, e.color, e.subheading, COUNT(esa.id) AS subcat_count

With:

SELECT COUNT(e.id) AS count


Or am I completely missing the point?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux