Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Mysql select and store one field

by nedals (Deacon)
on Sep 08, 2011 at 00:12 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found