Re: Mysql database not being updated

2007-09-24 Thread Paul Lalli
On Sep 24, 2:48 am, [EMAIL PROTECTED] (kapil.V) wrote: > Hi, >I used the code: >sub set_min{ > > $host = shift; > $date = shift; Here you set $host and $date to be two parameters passed into your set_min function. > print "The host is $host and the date

Re: Mysql database not being updated

2007-09-24 Thread Chas. Owens
On 9/24/07, kapil.V <[EMAIL PROTECTED]> wrote: snip > my $insert_query = qq{ > UPDATE hosts SET last_checked = '$date' WHERE hostname = > '$host'; > }; > $sth = $db -> prepare($insert_query) > or die "Could not prepare the statement: ".$db ->

Re: Mysql database not being updated

2007-09-24 Thread Matthew Whipple
You have two $host variables, the one passed as the parameter will be overwritten by the SOX function which returns the DB host name used for connection. In the Update query that would remain constant for whatever database you connected to. I'm guessing the problem is that you want separate varia