Closed dk closed 5 years ago
When using named placeholders, you must bind them by name using bind_param
:
my $sth = $dbh->prepare('SELECT now() where 1 = :id');
$sth->bind_param(':id', $id);
$sth->execute;
$sth->fetchrow_array; # '2019-03-30 22:20:44.600588+00'
thank you!
Legacy code using ":foo" style selects fails with this error. The code is as follows:
Since the call is issued as
with idx being the third parameter with the integer, and the third parameter is supposed to be a ":foo" string inside dbd_bind_ph, I can't find a way how this supposed to be working.