#!/usr/bin/php connect()) { $myLog->log(LOG_WARNING, "Could not connect to database"); exit(1); } $everything = ""; $result=$db->customQuery("SELECT id, active, secret ". "FROM clients ". "ORDER BY id"); while($row = $db->fetchArray($result)) { $active = $row['active']; if ($active == "") { # For some reason PostgreSQL returns empty strings for false values?! $active = "0"; } $everything .= $row['id'] . "\t" . $active . "\t" . $row['secret'] . "\n"; } $db->closeCursor($result); $hash = sha1 ($everything); if ($verbose) { print $everything; } print substr ($hash, 0, 10) . "\n"; $result=null; $db=null;