So %hashref now has the modified list of priorities with the task_ID as the key.
I think I'm beginning to get the hang of this...
I do have use DBI in the code (clipped it by accident when I extracted the segment) but you are quite right about me missing the the fetchrow_hashref method. D'Oh.
Dave
On Thursday, June 5, 2003, at 07:55 pm, Scot Robnett wrote:
Sorry, forgot to comment something...yeeesh
#!/usr/local/perl -wT use strict; use CGI; use DBI; # need this!
my $marker = 5; # (or whatever number) my $dbh=DBI->connect(DBI:mysql:database:localhost,"user","password"); my $sth=$dbh->prepare("SELECT task_ID, priority FROM task_list WHERE priority > ?"); $sth->execute($marker); while(my($hashref) = $response->fetchrow_hashref) { $hashref->{priority}--; # decrement each priority by 1 } $sth->finish; $dbh->disconnect;
Scot R. inSite
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]