![]() |
|
|
|||||||
![]() |
PERL - Re: how to select rows with $dbh->do($sql) |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Can't use "do" for a select, for this very reason - it does not retrun the
data. <> wrote in message news:... > I've read that doing do($sql) is faster than doing a prepare and > excute, except I can't find how to select the rows in a table. > > Something like the following > > $sql = "select fieldA, fieldB from table" > my $row = $dbh->do($sql) or die "select failed"; > > I can't see how to get the while to loop through the data the select > would return > > while ( $row = fetchrow_hashref ) > { fieldAreturned = $row->(fieldA); > fieldBretruned = $row->(fieldB) > } > > thanks Scott Lander |
|
|