Correct Default values
Correct default values Fix SQL syntax error
This commit is contained in:
parent
e8dae84512
commit
17293287fa
File diff suppressed because it is too large
Load diff
|
@ -83,11 +83,11 @@ class dbinterface
|
||||||
} elseif (!empty($data['type'])) {
|
} elseif (!empty($data['type'])) {
|
||||||
switch ($data['type']) {
|
switch ($data['type']) {
|
||||||
case "cisco-sip":
|
case "cisco-sip":
|
||||||
$stmts = $dbh->prepare('SELECT ' . $fld . ' FROM sccpdeviceconfig WHERE TYPE LIKE \'%-sip\' ORDER BY name');
|
$stmts = $dbh->prepare("SELECT {$fld} FROM sccpdeviceconfig WHERE TYPE LIKE '%-sip' ORDER BY name");
|
||||||
break;
|
break;
|
||||||
case "cisco": // Fall through to default intentionally
|
case "cisco": // Fall through to default intentionally
|
||||||
default:
|
default:
|
||||||
$stmts = $dbh->prepare('SELECT ' . $fld . ' FROM sccpdeviceconfig WHERE TYPE not LIKE \'%-sip\' ORDER BY name');
|
$stmts = $dbh->prepare("SELECT {$fld} FROM sccpdeviceconfig WHERE TYPE not LIKE '%-sip' ORDER BY name");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else { //no filter and no name provided - return all
|
} else { //no filter and no name provided - return all
|
||||||
|
@ -219,10 +219,10 @@ class dbinterface
|
||||||
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) ORDER BY model");
|
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) ORDER BY model");
|
||||||
break;
|
break;
|
||||||
case 'ciscophones':
|
case 'ciscophones':
|
||||||
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor NOT LIKE \'%-sip\' ORDER BY model");
|
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor NOT LIKE '%-sip' ORDER BY model");
|
||||||
break;
|
break;
|
||||||
case 'sipphones':
|
case 'sipphones':
|
||||||
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor LIKE \'%-sip\' ORDER BY model");
|
$stmt = $dbh->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor LIKE '%-sip' ORDER BY model");
|
||||||
break;
|
break;
|
||||||
case 'all': // Fall through to default
|
case 'all': // Fall through to default
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue