Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Mysql select and store one field

by nedals (Deacon)
on Sep 08, 2011 at 00:12 UTC ( #924703=note: print w/replies, xml ) Need Help??


in reply to Mysql select and store one field

my ($post) = $dbh->selectrow_array("SELECT post FROM tablename WHERE u +rl=?", {}, $url);
Uses placeholders to prevent SQL injection but I would still validate the $url if it's comming from outside the script.
This assumes you are only expecting one row to be returned.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-12-09 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?