rickh57
06-27-03, 17:47
| Hi: I have a problem with using prepare/bind_param with the mysqlPP driver. It just doesn't want to work. The following code works fine when connecting to the database using DBD::ODBC, but fails with DBD::mysqlPP (it doesn't crash or anything, just no rows are returned). With the mysqlPP driver, if I change the query to explicately include the id parameter instead of calling bind_param, it works fine there, as well. my $query = qq{ SELECT p.Description, cr.PreviousPageID, cr.Visits FROM CrossRef AS cr INNER JOIN Page AS p ON cr.PreviousPageID=p.PageID WHERE cr.NextPageID=?}; $sth = $dbh->prepare($query); $sth->bind_param(1,$id); $sth->execute(); $sth->bind_columns(undef,\$description,\$prevId,\$visits ); while ($sth->fetch()) { push @array, "$description|$prevId|$visits"; } Am I missing something? Thanks, |