Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: selectrow_array() confusion

by Equidor (Sexton)
on Nov 27, 2008 at 17:13 UTC ( [id://726454]=note: print w/replies, xml ) Need Help??


in reply to selectrow_array() confusion

Never tried the database handle selectrow_array() method, but
we know the statement handle fetchrow_array() works:

$dbh = DBI->connect($dsn, $user, $passwd);
$sql = "select min(thing) as itsmin, max(thing) as itsmax from images where foo like 'bar%'";
$sth = $dbh->prepare($sql);
$sth->execute;
while ( @row = $sth->fetchrow_array() ) {
  print @row . "\n";
}

Check the CPAN DBI doc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://726454]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-18 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found