× 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.



Browsing through the other supported database functions in the PHP manual, it appears quite a few support a _num_rows function: odbc_num_rows, mysql_num_rows, mssql_num_rows, sybase_num_rows. But it's not all of them -- dBase, Firebird/Interbase, Mongo don't.

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /

Kelly Cookson wrote:
If you're using the db2_ functions, you can use db2_num_rows to get the number of rows deleted, inserted, or updated by an SQL statement.

Use SELECT COUNT(*) to get the number of rows returned by a select statement.

See the PHP manual for more info and examples: http://www.php.net/manual/en/function.db2-num-rows.php

Kelly


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Larry Kleinman
Sent: Tuesday, December 15, 2009 8:32 AM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] getting number of records returned by SQL in PHP

Hi all - net.data has a nice feature called TOTAL_ROWS which gives the total number of rows returned by a SQL query. Is there something similar in PHP?


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.