RE: [PHP-PEAR] DB: number of rows returned
| From: | Tracy Finifter | Date: | Tue, 14 Nov 2000 16:44:43 +0000 |
| Subject: | RE: [PHP-PEAR] DB: number of rows returned | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-438@lists.php.net to get a copy of this message | ||
mysql_num_rows ($res);
> -----Original Message-----
> From: Tobias Michaelsen [mailto:thm-dev@iname.com]
> Sent: Tuesday, November 14, 2000 8:09 AM
> To: php-pear@lists.php.net
> Subject: [PHP-PEAR] DB: number of rows returned
>
>
> Is there a method for finding out how many rows a query returned?
>
> {{{ Example:
>
> <?php
>
> include_once("DB.php");
> $db = DB::connect("mysql://user:passwd@localhost/database");
>
> $res = $db->query("SELECT * FROM members WHERE name='$name'");
>
> echo $res->numRows();
>
> ?>
>
> }}}
>
> -Tobias-
>
>
> --
> PHP Extension and Add-on Repository (PEAR) mailing list.
> Documentation can be found at http://pear.php.net/doc/pear.html
> To unsubscribe, e-mail: php-pear-unsubscribe@lists.php.net from the
> mail address you subscribed with.
>