Fixing broken things...

git-svn-id: http://www.observium.org/svn/observer/trunk@87 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-04-09 16:39:23 +00:00
parent ee301e130c
commit a5dbc8b292
7 changed files with 520 additions and 509 deletions

View File

@@ -3,12 +3,25 @@
<?php
include("config.php");
include("includes/functions.php");
$data = `snmptable -Ov -v2c -c v05tr0n82 sotsci-sw01 ifTable`;
$query = mysql_query("SELECT * FROM devices WHERE device_id = '8'");
$array = mysql_fetch_array($query);
echo($array[1] . "\n");
mysql_query("UPDATE `devices` SET `hostname` = 'sotsci-fw-office01.vostron.net' WHERE `device_id` = '8'");
echo(mysql_affected_rows() . " rows changed\n");
$query = mysql_query("SELECT * FROM devices WHERE device_id = '8'");
$array = mysql_fetch_array($query);
echo($array[1] . "\n");
$data = trim(preg_replace("/(\ +)/", " ", $data));
echo("$data");
?>