in reply to Re: $dbh->quote(..., SQL_INTEGER)
in thread $dbh->quote(..., SQL_INTEGER)
With PostgreSQL and DBD::Pg, the placeholders are substituted on the client. Without bind_param types, they use strings which are converted for all normal types. This doesn't work for LIMIT clause which must be an unquoted number. Supposedly, setting the type with bind_param will work:
I don't know what will happen when the server-side parameters are implemented.my $sth = $dbh->prepare("SELECT * FROM big_table LIMIT ?"); $sth->bind_param(1, $value, SQL_INTEGER); $sth->execute(10);
|
|---|