I don't think there is a way to make fetchrow_array() reverse the sequence
in which it delivers data. You can always store the data in a variable if
you need to use it later. Otherwise, if you are receiving rows of data from
the database in an order that makes it hard to work with you may want to try
asking the database to send the data in a different order by using "ORDER
BY" in your select statement.

If that doesn't help, can I ask why you need to step backwards through the
rows of data? Maybe we can figure something else out...

-----Original Message-----
From: Nicolay Vasiliev [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 16, 2004 10:14 AM
To: [EMAIL PROTECTED]
Subject: Resetting of the dataset


Hello there!

I have some dataset got by the executing of some query. For example:

my $sth = $dbh->prepare('select * from sometable');
$sth->execute();

Going through this dataset by $sth->fetchrow_array() I need to go back 
inside this proccess. Sorry, but I have no idea how can I do this. How 
can I reset this dataset to move to the first record?

TIA.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to