mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
add 'as count' to sql to get it working on mysql
This commit is contained in:
parent
c4a6fdfc9d
commit
1b848cb77e
@ -47,7 +47,7 @@ if (!$db->connect()) {
|
||||
}
|
||||
|
||||
function get_count($db, $table, $conditions) {
|
||||
$res = $db->customQuery('SELECT count(1) FROM ' . $table . ' WHERE ' . $conditions);
|
||||
$res = $db->customQuery('SELECT count(1) as count FROM ' . $table . ' WHERE ' . $conditions);
|
||||
if ($res) {
|
||||
$r = $res->fetch(PDO::FETCH_ASSOC);
|
||||
return $r['count'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user