×

Good News Everybody!

A new search engine is coming soon.

As a stop gap measure, we are using Google's custom search engine service.




For what it's worth, just because the function is there doesn't mean that
the result set will have the necessary meta data for the function to work.
e.g. odbc_num_rows against DB2 on the i returns 0 (maybe it was 1) and
iirc, there is an i5_num_rows defined but it likewise returns 0.

Alfred
--
Alfredo Delgado / Web Development
6800 Broken Sound Pkwy, Suite 150
Boca Raton, Florida 33487
-----web400-bounces@xxxxxxxxxxxx wrote: -----

To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
From: Peter Dow <petercdow@xxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
Date: 12/15/2009 11:41
Subject: Re: [WEB400] getting number of records returned by SQL in PHP

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 <[1]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:
> [2]http://www.php.net/manual/en/function.db2-num-rows.php
>
> Kelly
>
>
> -----Original Message-----
> From: web400-bounces@xxxxxxxxxxxx
[[3]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
>
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [4]http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [5]http://archive.midrange.com/web400.

References

Visible links
1. mailto:pdow@xxxxxxxxxxxxxxx
2. http://www.php.net/manual/en/function.db2-num-rows.php
3. mailto:web400-bounces@xxxxxxxxxxxx
4. http://lists.midrange.com/mailman/listinfo/web400
5. http://archive.midrange.com/web400

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.