in reply to Reusing placeholders

> (dateDue >= ?:NOW

This puzzled me ...

> . I have tried using bind_param but that doesn't work ... The documentation is not very clear.

Really?

It says (emphasize added):

Some drivers also allow placeholders like :name and :N (e.g., :1, :2, and so on) in addition to ?, but their use is not portable.

If the :N form of placeholder is supported by the driver you're using, then you should be able to use either "bind_param" or "execute" to bind values. Check your driver documentation

So you need to check the DBD:: you are using

update

but I agree that the documentation of DBI is hard to read.

This might be because of

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Reusing placeholders
by Bod (Parson) on Mar 27, 2021 at 23:17 UTC
    So you need to check the DBD:: you are using

    I am using MariaDB but using DBD::mysql as the driver.

      I couldn't find any hint of that "named/numbered placeholder" feature in DBD::mysql .

      If anyone is aware of a DBD that supports this, I'd be interested to know.

      FWIW I wrote a meditation on a Perl implementation for named placeholders.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery