× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think you'll be pleased with the performance of select count(*) for most result sets, even though it would be running a two select statements. That may be what net.data is doing under the covers, too. You and your users can decide whether the added overhead is worth it.

Nathan.



----- Original Message ----
From: Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Tue, December 15, 2009 8:52:47 AM
Subject: Re: [WEB400] getting number of records returned by SQL in PHP

Unless I do a GROUP BY (which I do not want to do), I don't think that I
can use the SELECT COUNT(*) and also get the actual fields returned in a
single SQL query, can I? That would mean that I would have to run the
query twice, once to get the data and once to get the count. Not a great
thing to do from a performance point of view


Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.