Beau E. Cox wrote:

my $sth = $dbh->prepare("select * from some_table limit ?");
  OK
$sth->execute(10);
  same syntax error as with 'mysql'

It would probably work by using $sth->bind_param and specifying the type. (DBD::mysql contained an incompatbile change that made all anonymous placeholders strings by default.)

However, using a placeholder for the LIMIT clause cannot be
recommended anyways: It is not portable and perhaps even not
upwards compatible, if at some point the DBD::mysql driver
uses server side placeholders.


Jochen




Reply via email to