Help - Search - Members - Calendar
Full Version: BUG FIX: Page breaks appearing across surveys
Big Red Spark Forums > Big Red Spark.com Forums > Unit Command Climate Assessment and Survey System (UCCASS)
JHolmes763
A user recently pointed out the issue with page breaks appearing across surveys when added to an existing survey. The problem is in the query that handles the page break and associated page and ordering numbers of the questions.

Line 1177 of classes/editsurvey.class.php is currently this:
CODE
                    $query = "UPDATE {$this->CONF['db_tbl_prefix']}questions SET page = page + 1 WHERE sid = $sid AND
                              (page > $page) OR (page = $page AND oid > $oid)";
and should be changed to this
CODE
                    $query = "UPDATE {$this->CONF['db_tbl_prefix']}questions SET page = page + 1 WHERE sid = $sid AND
                              ((page > $page) OR (page = $page AND oid > $oid))";
Note the addition of the extra paranthesis around the last three conditions.

Simple mistake and easy fix, but a pain in the rear for many of you, probably. I've already updated the code for the next version.

---John Holmes...
wiseloren
BUG FIX: Tables and CSV not working

Replace GREATEST with COALESCE in classes/special_results.class (6 replaces)

This bug is due to a functionality change between mysql version 3-4 and version 5.
lovepade
QUOTE(wiseloren @ Jul 3 2007, 03:23 PM) *

BUG FIX: Tables and CSV not working

Replace GREATEST with COALESCE in classes/special_results.class (6 replaces)

This bug is due to a functionality change between mysql version 3-4 and version 5.


I used this bug fix with the intention to get results in CSV or table format (something sure was broken).. Now I get this error

CODE
Error in query: FUNCTION [databasename].COALESCE does not exist


Any ideas? - pls?
JHolmes763
Are you using MySQL 5? What specific version, if you are?
lovepade
QUOTE(JHolmes763 @ Aug 27 2007, 09:45 AM) *

Are you using MySQL 5? What specific version, if you are?


MySQl 5.0.27
Protokolversion 10 (dont know what this is?)
UTF-8 Unicode_ci

Thx - in advance
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.