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

Re^2: Recalcitrant placeholders

by afoken (Chancellor)
on Jul 06, 2021 at 20:43 UTC ( [id://11134726]=note: print w/replies, xml ) Need Help??


in reply to Re: Recalcitrant placeholders
in thread Recalcitrant placeholders

my $crid = $crm->db->selectrow_array("SELECT idPerson FROM Person WHER +E email = ? OR altEmail = ?", undef, quotemeta $data{'email'}, quotem +eta $data{'email'});

That looks just wrong. There should be absolutely no need to quote bind values in DBI. Adding any kind of extra quoting just makes things worse. DBI and the DBD take care of everything needed to pass bind parameters to the database.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 01:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found