RE: Resetting of the dataset
From: Brian Barto (brian.barto_at_spectrum-health.org)
Date: 12/16/04
- Next message: Brian Barto: "RE: Resetting of the dataset"
- Previous message: Bill Adams: "RE: find sub {}"
- Maybe in reply to: Nicolay Vasiliev: "Resetting of the dataset"
- Next in thread: Brian Barto: "RE: Resetting of the dataset"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Thu, 16 Dec 2004 15:39:35 -0500
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:nvasiliev@whiteriversoft.com]
Sent: Thursday, December 16, 2004 10:14 AM
To: beginners@perl.org
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: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.org <http://learn.perl.org/> <http://learn.perl.org/first-response>
- Next message: Brian Barto: "RE: Resetting of the dataset"
- Previous message: Bill Adams: "RE: find sub {}"
- Maybe in reply to: Nicolay Vasiliev: "Resetting of the dataset"
- Next in thread: Brian Barto: "RE: Resetting of the dataset"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|