in reply to Mysql Health script
but from our chat at the Chatterbox, I think this is more like what you want:sub open_report { my $sgv = $dbh->prepare("show variables"); $sgv->execute(); while (my $gv=$sgv->fetchrow_hashref()) { %MySQL_Variables{@gv[0]} = @gv[1];(is there a systax err here) Then to use a mysql item in perl use %MySQL_Variables{"uptime"} } $sgv->finish(); }
sub open_report { my $sgv = $dbh->prepare("show variables"); $sgv->execute(); %MySQL_Variables = (); while (my($name, $value) = $sgv->fetchrow_array()) { $MySQL_Variables{$name} = $value; # is there a systax err here # Then to use a mysql item in perl use # $MySQL_Variables{"uptime"} } }
|
|---|