R: [PHP-DB] Interbase: Number recs
| From: | Roberto Sartor | Date: | Thu, 05 Oct 2000 13:02:55 +0000 |
| Subject: | R: [PHP-DB] Interbase: Number recs | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3351@lists.php.net to get a copy of this message | ||
Only with cursors you can go up and down on recordset, not on SELECT query
(generally speaking)
Ciao
Roberto
> -----Messaggio originale-----
> Da: David Tod Sigafoos [mailto:dsig@teleport.com]
> Inviato: lunedì 2 ottobre 2000 19.33
> A: php-db@lists.php.net
> Cc: Todd Cary
> Oggetto: Re: [PHP-DB] Interbase: Number recs
>
>
> Hello Todd,
>
> Not sure about interbase BUT in MySql it would be mysql_num_rows()
>
> DSig
> David Tod Sigafoos
>
>
> Monday, October 02, 2000, 10:20:58 AM, you wrote:
>
> TC> Is there an easier way to get the number of records from a SELECT?
>
> TC> +++
> TC> $stmt = 'SELECT PH_CD,PH_ROLL,PH_FRAME_LABEL,PH_ID
> FROM PHOTOS';
> TC> $sth = ibase_query($stmt,$dbh);
> TC> $ct = 0;
> TC> while ($row = ibase_fetch_row($sth)) {
> TC> ++$ct;
> TC> };
>
> TC> $totalrecs = $ct;
> TC> +++
>
> TC> What is the method to go to the first record?
>
> TC> Todd
>
> TC> --
> TC> Todd Cary
> TC> Ariste Software
> TC> todd@aristesoftware.com
>
>
>
>
>
>
> --
> Best regards,
> David mailto:dsig@teleport.com
>