From 0d1bd8db3ced1acc89a5c9d62993d0009d109651 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 12 Mar 2010 10:09:19 +0000 Subject: [PATCH] Work around PostgreSQL bug. --- ykval-checksum-clients.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ykval-checksum-clients.php b/ykval-checksum-clients.php index 1f0e4ec..045dd23 100755 --- a/ykval-checksum-clients.php +++ b/ykval-checksum-clients.php @@ -39,6 +39,10 @@ $result=$db->customQuery("SELECT id, active, secret ". "FROM clients ". "ORDER BY id"); 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 . $row['id'] . "\t" . $row['active'] . "\t" . $row['secret'] . "\n";