in reply to DBI - retrieving a specific row
It's really no big deal, and doesn't require any freaky LIMIT or anything like that. Of course, this assumes that your SELECT will only return one row (which it will, if you're SELECTing from a Primary Key).my $sth=$dbh->prepare("SELECT * FROM my_table WHERE primary_key = ?"); $sth->execute(4); my @record = $sth->fetchrow();
Update:Whoops. Misunderstood what the poster wanted. Ah well... hakkr's post has what you want.
Gary Blackburn
Trained Killer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI - retrieving a specific row
by S_Shrum (Pilgrim) on Feb 07, 2002 at 11:32 UTC |