1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 10:52:15 +01:00

Work around PostgreSQL bug.

This commit is contained in:
Simon Josefsson 2010-03-12 10:09:19 +00:00
parent 8a5650792b
commit 0d1bd8db3c

View File

@ -39,6 +39,10 @@ $result=$db->customQuery("SELECT id, active, secret ".
"FROM clients ". "FROM clients ".
"ORDER BY id"); "ORDER BY id");
while($row = $result->fetch(PDO::FETCH_ASSOC)) { while($row = $result->fetch(PDO::FETCH_ASSOC)) {
if ($row['active'] = "") {
# For some reason PostgreSQL returns empty strings for false values?!
$row['active'] = "0";
}
$everything = $everything . $everything = $everything .
$row['id'] . "\t" . $row['active'] . "\t" . $row['secret'] . $row['id'] . "\t" . $row['active'] . "\t" . $row['secret'] .
"\n"; "\n";