
abelsgmx
Novice
Jun 6, 2002, 11:19 AM
Post #1 of 7
(16935 views)
|
Problems whit DBI Interfase
|
Can't Post
|
|
How to do a SELECT MAX statement, I haev have problems whit this code:
$dbh = DBI->connect ($dsn, $usr, $pwd, {RaiseError => 1}); $sth = $dbh->prepare (" SELECT max(id_age) as id_age FROM teachers "); $sth->execute ; $id_age = $sth->fetchrow_array; $sth->finish; $dbh->disconnect; This don't return the max value, some one know how do for this?, thanks a lot!!!
|