MySQL Forums
Forum List  »  Perl

Re: Perl script Mysql update help
Posted by: Randy Clamons
Date: September 04, 2012 12:27PM

Where do you get the error, on the prepare or the execute?

Usually, you would do it like this:

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

Options: ReplyQuote


Subject
Written By
Posted
September 02, 2012 08:00AM
September 03, 2012 11:33AM
Re: Perl script Mysql update help
September 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.