mirror of
https://github.com/Yubico/yubikey-ksm.git
synced 2024-11-29 00:24:14 +01:00
change the sql syntax for active so it works on sqlite
This commit is contained in:
parent
e97b730bfc
commit
bb33451eda
@ -72,9 +72,10 @@ else {
|
||||
}
|
||||
|
||||
$sql = "SELECT aeskey, internalname FROM yubikeys " .
|
||||
"WHERE publicname = '$id' AND active";
|
||||
"WHERE publicname = '$id' AND ";
|
||||
|
||||
if (!$use_oci) {
|
||||
$sql .= "(active OR active = 'true')";
|
||||
$result = $dbh->query($sql);
|
||||
if (!$result) {
|
||||
syslog(LOG_ERR, "Database query error. Query: " . $sql . " Error: " .
|
||||
@ -87,7 +88,7 @@ if (!$use_oci) {
|
||||
$internalname = $row['internalname'];
|
||||
}
|
||||
else {
|
||||
$sql .= " = 1";
|
||||
$sql .= "active = 1";
|
||||
$result = oci_parse($dbh, $sql);
|
||||
$execute = oci_execute($result);
|
||||
if (!$execute) {
|
||||
|
Loading…
Reference in New Issue
Block a user