Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: DBI placeholders and like statement

by stevieb (Canon)
on Nov 16, 2024 at 11:13 UTC ( [id://11162754]=note: print w/replies, xml ) Need Help??


in reply to Re^2: DBI placeholders and like statement
in thread DBI placeholders and like statement

It is so odd that I was having difficulty with this just yesterday. I must have been missing something obvious, because this works for me:

use warnings; use strict; use Test::Thing; my $Test = Test::Thing->new; my $q = qq{ SELECT x FROM y.z WHERE a LIKE ? LIMIT 1 }; my ($result) = $Test->db->dbh->selectrow_array($q, undef, "1111%");

Details masked, and normally query calls are hidden in the backend. However, that test succeeded.

I can't even imagine what I was trying yesterday to have it fail. Again, it is so very interesting that this specific issue was brought up here after 10+ years.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11162754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2026-01-14 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.