# HG changeset patch # User Matti Hamalainen # Date 1417251636 -7200 # Node ID c1738ee91f6a147b0f044c5a5288c3c622ada43d # Parent d28f36ced1782f3d0b263efb02a7f093a5cf617d Fix SQL for PostGres. diff -r d28f36ced178 -r c1738ee91f6a pages/vote.inc.php --- 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 @@ " \n"; $row = 0; - foreach (stExecSQL("SELECT * ".$esql) as $entry) + foreach (stExecSQL("SELECT * ".$esql." ORDER BY show_id ASC") as $entry) { $eid = $entry["id"]; echo