Merge pull request #1647 from laf/issue-12-new

Added mysqli support
This commit is contained in:
Daniel Preussker
2015-08-12 22:06:09 +02:00
17 changed files with 1185 additions and 583 deletions
-3
View File
@@ -545,9 +545,6 @@ function discover_storage(&$valid, $device, $index, $type, $mib, $descr, $size,
),
'storage'
);
if ($debug) {
mysql_error();
}
echo '+';
}
-2
View File
@@ -56,11 +56,9 @@ $sql = "SELECT * FROM `hrDevice` WHERE `device_id` = '".$device['device_id']."'
foreach (dbFetchRows($sql) as $test_hrDevice) {
if (!$valid_hrDevice[$test_hrDevice['hrDeviceIndex']]) {
echo '-';
mysql_query("DELETE FROM `hrDevice` WHERE hrDevice_id = '".$test_hrDevice['hrDevice_id']."'");
dbDelete('hrDevice', '`hrDevice_id` = ?', array($test_hrDevice['hrDevice_id']));
if ($debug) {
print_r($test_hrDevice);
echo mysql_affected_rows().' row deleted';
}
}
}
-6
View File
@@ -20,9 +20,6 @@ foreach ($stack_poll_array as $port_id_high => $entry_high) {
else {
dbUpdate(array('ifStackStatus' => $ifStackStatus), 'ports_stack', 'device_id=? AND port_id_high=? AND `port_id_low`=?', array($device['device_id'], $port_id_high, $port_id_low));
echo 'U';
if ($debug) {
echo mysql_error();
}
}
unset($stack_db_array[$port_id_high][$port_id_low]);
@@ -30,9 +27,6 @@ foreach ($stack_poll_array as $port_id_high => $entry_high) {
else {
dbInsert(array('device_id' => $device['device_id'], 'port_id_high' => $port_id_high, 'port_id_low' => $port_id_low, 'ifStackStatus' => $ifStackStatus), 'ports_stack');
echo '+';
if ($debug) {
echo mysql_error();
}
}
}//end foreach
}//end foreach