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

Re: Updating a mysql row

by imp (Priest)
on Feb 22, 2007 at 21:34 UTC ( [id://601649]=note: print w/replies, xml ) Need Help??


in reply to Updating a mysql row

Yes, do it exactly as you suggested... except you really should use bound parameters to avoid SQL injection attacks. Alternately you can use DBI's quote method

Something like this:

my $sql = q{UPDATE now_time SET time= NOW(), location=?, count=count+1 + WHERE ip=?}; $dbh->do($sql,{}, $ENV{HTTP_REFERER}, $userip) or die $dbh->errstr;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-16 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found