Skip to content

Commit

Permalink
Fixed conditions bug - if the conditions were not read from the db in…
Browse files Browse the repository at this point in the history
… order of "cqid", the conditions may fail. Conditions SQL now orders by cqid field to resolve this bug.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@932 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Feb 24, 2004
1 parent 8085da3 commit 8173e1b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion qanda.php
Expand Up @@ -54,7 +54,18 @@
$display = $ia[7];
if ($ia[7] == "Y")
{ //DEVELOP CONDITIONS ARRAY FOR THIS QUESTION
$cquery = "SELECT {$dbprefix}conditions.qid, {$dbprefix}conditions.cqid, {$dbprefix}conditions.cfieldname, {$dbprefix}conditions.value, {$dbprefix}questions.type, {$dbprefix}questions.sid, {$dbprefix}questions.gid FROM {$dbprefix}conditions, {$dbprefix}questions WHERE {$dbprefix}conditions.cqid={$dbprefix}questions.qid AND {$dbprefix}conditions.qid=$ia[0]";
$cquery = "SELECT {$dbprefix}conditions.qid, "
."{$dbprefix}conditions.cqid, "
."{$dbprefix}conditions.cfieldname, "
."{$dbprefix}conditions.value, "
."{$dbprefix}questions.type, "
."{$dbprefix}questions.sid, "
."{$dbprefix}questions.gid "
."FROM {$dbprefix}conditions, "
."{$dbprefix}questions "
."WHERE {$dbprefix}conditions.cqid={$dbprefix}questions.qid "
."AND {$dbprefix}conditions.qid=$ia[0] "
."ORDER BY {$dbprefix}conditions.cqid";
$cresult = mysql_query($cquery) or die ("OOPS<BR />$cquery<br />".mysql_error());
while ($crow = mysql_fetch_array($cresult))
{
Expand Down

0 comments on commit 8173e1b

Please sign in to comment.