Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Place holders in SQL query

by McA (Priest)
on Oct 10, 2014 at 16:26 UTC ( [id://1103442]=note: print w/replies, xml ) Need Help??


in reply to Place holders in SQL query

Hi,

not an answer to your initial question, but an addendum: Why not just use a join or subselect? This saves really roundtrips and (real) databases are very good in this. Example:

select code from othertable where year = ? and state in (select state from mytable where city = ?)

Regards
McA

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found