change interfaces table to ports (to match GUI conventions)

git-svn-id: http://www.observium.org/svn/observer/trunk@889 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-20 17:22:22 +00:00
parent fd3955d8f0
commit 0bee34b6ad
80 changed files with 299 additions and 297 deletions

View File

@@ -13,7 +13,7 @@ function mres($string) { // short function wrapper because the real one is stupi
}
function getifhost($id) {
$sql = mysql_query("SELECT `device_id` from `interfaces` WHERE `interface_id` = '$id'");
$sql = mysql_query("SELECT `device_id` from `ports` WHERE `interface_id` = '$id'");
$result = @mysql_result($sql, 0);
return $result;
}
@@ -45,19 +45,19 @@ function getpeerhost($id) {
}
function getifindexbyid($id) {
$sql = mysql_query("SELECT `ifIndex` FROM `interfaces` WHERE `interface_id` = '$id'");
$sql = mysql_query("SELECT `ifIndex` FROM `ports` WHERE `interface_id` = '$id'");
$result = @mysql_result($sql, 0);
return $result;
}
function getifbyid($id) {
$sql = mysql_query("SELECT * FROM `interfaces` WHERE `interface_id` = '$id'");
$sql = mysql_query("SELECT * FROM `ports` WHERE `interface_id` = '$id'");
$result = @mysql_fetch_array($sql);
return $result;
}
function getifdescrbyid($id) {
$sql = mysql_query("SELECT `ifDescr` FROM `interfaces` WHERE `interface_id` = '$id'");
$sql = mysql_query("SELECT `ifDescr` FROM `ports` WHERE `interface_id` = '$id'");
$result = @mysql_result($sql, 0);
return $result;
}