dbConn->prepare($qry); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if(array_key_exists($row['Guid'], $tmp) == true) { $tmpInt = $tmp[$row['Guid']]['totalSeen']+1; $tmp[$row['Guid']]['totalSeen'] = $tmpInt; $tmp[$row['Guid']]['SigId'][$tmpInt]= $row['SigId']; }else{ $tmp[$row['Guid']]['SigId'] = array($row['SigId']); $tmp[$row['Guid']]['ClientIP'] = $row['ClientIp']; $tmp[$row['Guid']]['totalSeen'] = 1; } } return $tmp; } catch (PDOException $e) { $this->lastError = $e->getMessage(); return -1; } } }//end class $db = new DBSql(); //('192.168.9.10', 'drendler', 'bXn8LV7ViZgAx6A', '5432', 'CAMDPAMS'); $qry = "select \"Guid\", \"ClientIp\",\"SigId\", \"AddedTs\", \"CallerTypeId\" as IP from fls_samples_sigs_log where (\"AddedTs\" between '13-Sep-2011 11:00:00' and '13-Sep-2011 12:00:00' and \"CallerTypeId\" = 1) group by \"Guid\", \"ClientIp\",\"SigId\", \"AddedTs\", \"CallerTypeId\" limit 100000"; var_dump($qry); $ret = $db->sqlExec($qry); var_dump($ret); var_dump($db->getLastError()); ?>