[Dehs-devel] r141 - trunk

atomo64-guest at alioth.debian.org atomo64-guest at alioth.debian.org
Mon Jun 2 00:08:32 UTC 2008


Author: atomo64-guest
Date: 2008-06-02 00:08:31 +0000 (Mon, 02 Jun 2008)
New Revision: 141

Modified:
   trunk/events.class.php
Log:
Make sure we abort if we fail to SELECT


Modified: trunk/events.class.php
===================================================================
--- trunk/events.class.php	2008-06-01 23:45:11 UTC (rev 140)
+++ trunk/events.class.php	2008-06-02 00:08:31 UTC (rev 141)
@@ -127,7 +127,7 @@
         $eventType    = pg_escape_string($eventType);
         $packageName  = pg_escape_string($packageName);
 
-        $result = pg_exec($db, "SELECT id FROM events WHERE name='$packageName' and type='$eventType' ".($distribution? "and dist='$distribution'":'')." and content LIKE '$contentSearch'");
+        $result = pg_exec($db, "SELECT id FROM events WHERE name='$packageName' and type='$eventType' ".($distribution? "and dist='$distribution'":'')." and content LIKE '$contentSearch'") or die_status(pg_last_error($db)."\nFailed to SELECT id FROM events...\n");
         return pg_fetch_all($result);
     }
 




More information about the Dehs-devel mailing list