MySQL Forums
Forum List  »  Perl

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
September 02, 2012 08:00AM
September 03, 2012 11:33AM


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.