changeset 972:c1738ee91f6a

Fix SQL for PostGres.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Nov 2014 11:00:36 +0200
parents d28f36ced178
children 9c7e91d813a0
files pages/vote.inc.php
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pages/vote.inc.php	Sat Nov 29 10:43:31 2014 +0200
+++ b/pages/vote.inc.php	Sat Nov 29 11:00:36 2014 +0200
@@ -121,7 +121,7 @@
 
   foreach (stExecSQL("SELECT * FROM compos WHERE visible<>0 AND voting<>0") as $compo)
   {
-    $esql = stPrepareSQL("FROM entries WHERE (flags & %d)=0 AND compo_id=%d ORDER BY show_id ASC", EFLAG_DISQUALIFIED, $compo["id"]);
+    $esql = stPrepareSQL("FROM entries WHERE (flags & %d)=0 AND compo_id=%d", EFLAG_DISQUALIFIED, $compo["id"]);
     $nentries = stFetchSQLColumn("SELECT COUNT(*) ".$esql);
     if ($nentries > 0)
     {
@@ -138,7 +138,7 @@
       "  </tr>\n";
 
       $row = 0;
-      foreach (stExecSQL("SELECT * ".$esql) as $entry)
+      foreach (stExecSQL("SELECT * ".$esql." ORDER BY show_id ASC") as $entry)
       {
         $eid = $entry["id"];
         echo