Re: Datasets
| From: | Richard Lynch | Date: | Fri, 19 Jan 2001 17:55:36 +0000 |
| Subject: | Re: Datasets | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35671@lists.php.net to get a copy of this message | ||
> Hi.... My name is Bruno, I'm in Brazil and I'm new in PHP...
>
>
> I wanna know how can I roll in the records in a dataset.
> Like...
> Move First
> Move last
> Move next.....os something like this
Depends on which database you use...
Assuming it's MySQL, you have http://php.net/mysql_fetch_row and
http://php.net/mysql_fetch_array which are kinda like
moveNext, only better
:-)
To move back to the first (or any) record, you can use
http://php.net/mysql_data_seek (I think it's
data_seek...) It's in there
somewhere.
Oh yeah -- You've now triggered a nightmare that can only be expunged by my
singing a verse from my Microsoft Sucks song:
"Can't moveFirst in an empty record set.
Microsoft Sucks. Microsoft Sucks."
It's a very long song. Many, many verses. I used to sing it aloud at work.
:-)
By Day: |By Night:
Don't miss the Zend Web Store's | There's not enough room here...
Grand Opening on January 23, 2001! | Start here:
http://www.zend.com | http://l-i-e.com/artists.htm