Skip navigation links

MySQL Forums :: Perl :: Perl script Mysql update help


Advanced Search

Perl script Mysql update help
Posted by: Neil Bernard ()
Date: September 02, 2012 08:00AM

Ok I give up, i've read loads of posts I just cannot get this snippet work with variables, works fine if I use manual values.... Please help

$sql = 'UPDATE snmpcol SET sysUpTime = "$snmpresult" WHERE IP = "192.168.1.60"';
$sth = $dbh->prepare($sql) or die "Cannot prepare: " . $dbh->errstr();
$sth->execute() or die "Cannot execute: " . $sth->errstr();
$sth->finish();

Thanks in advance chaps

Options: ReplyQuote


Subject Written By Posted
Perl script Mysql update help Neil Bernard 09/02/2012 08:00AM
Re: Perl script Mysql update help Rick James 09/03/2012 11:33AM
Re: Perl script Mysql update help Randy Clamons 09/04/2012 12:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.