fix: Fix sql errors due to incorrect cef table name #5362

This commit is contained in:
David Bell
2017-01-13 11:14:20 +00:00
committed by Neil Lathwood
parent 4677f37ab3
commit d2ff7148c2

View File

@@ -25,8 +25,8 @@ if (is_array($cefs)) {
echo ' | |-'.$path.': '.$path_name['cefSwitchingPath']."\n";
$cef_exists[$device['device_id']][$entity][$afi][$path] = 1;
if (dbFetchCell('SELECT COUNT(*) from `cef` WHERE device_id = ? AND entPhysicalIndex = ?, AND afi=? AND cef_index=?', array($device['device_id'], $entity, $afi, $path)) != '1') {
dbInsert(array('device_id' => $device['device_id'], 'entPhysicalIndex' => $entity, 'afi' => $afi, 'cef_path' => $path), 'cef');
if (dbFetchCell('SELECT COUNT(*) from `cef_switching` WHERE device_id = ? AND entPhysicalIndex = ? AND afi=? AND cef_index=?', array($device['device_id'], $entity, $afi, $path)) != '1') {
dbInsert(array('device_id' => $device['device_id'], 'entPhysicalIndex' => $entity, 'afi' => $afi, 'cef_path' => $path), 'cef_switching');
echo '+';
}
}