Skip to content

Commit

Permalink
adodb fixes
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@1978 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed Aug 19, 2006
1 parent c2022a8 commit 2dcb03d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions admin/printablesurvey.php
Expand Up @@ -459,17 +459,17 @@
case "J": //FILE CSV MORE
echo "\t\t\t$setfont<u>"._("Please choose <strong>all</strong> that apply:")."</u><br />\n";
$meaquery = "SELECT * FROM {$dbprefix}answers WHERE qid={$deqrow['qid']} ORDER BY sortorder, answer";
$mearesult = mysql_query($meaquery);
while ($mearow = mysql_fetch_array($mearesult))
$mearesult = db_execute_assoc($meaquery);
while ($mearow = $mearesult->FetchRow())
{
echo "\t\t\t<input type='checkbox' name='$fieldname{$mearow['code']}' value='Y' />{$mearow['answer']}<br />\n";
}
break;
case "I": //FILE CSV ONE
echo "\t\t\t$setfont<u>"._("Please choose <strong>only one</strong> of the following:").":</u><br />\n";
$deaquery = "SELECT * FROM {$dbprefix}answers WHERE qid={$deqrow['qid']} ORDER BY sortorder, answer";
$dearesult = mysql_query($deaquery);
while ($dearow = mysql_fetch_array($dearesult))
$dearesult = db_execute_assoc($deaquery);
while ($dearow = $mearesult->FetchRow())
{
echo "\t\t\t<input type='checkbox' name='$fieldname' value='{$dearow['code']}' />{$dearow['answer']}<br />\n";
}
Expand Down
8 changes: 4 additions & 4 deletions admin/statistics.php
Expand Up @@ -224,9 +224,9 @@ function show(element) {
case "Q":
echo "\t\t\t\t</tr>\n\t\t\t\t<tr>\n";
$query = "SELECT code, answer FROM {$dbprefix}answers WHERE qid='$flt[0]' ORDER BY sortorder, answer";
$result = mysql_query($query) or die ("Couldn't get answers!<br />$query<br />".mysql_error());
$result = db_execute_assoc($query) or die ("Couldn't get answers!<br />$query<br />".$connect->ErrorMsg());
$counter2=0;
while ($row=mysql_fetch_row($result))
while ($row = $result->FetchRow())
{
$myfield2 = "Q".$myfield."$row[0]";
if ($counter2 == 4) {echo "\t\t\t\t</tr>\n\t\t\t\t<tr>\n"; $counter2=0;}
Expand Down Expand Up @@ -985,9 +985,9 @@ function show(element) {
{
list($qsid, $qgid, $qqid) = explode("X", substr($rt, 1, strlen($rt)), 3);
$nquery = "SELECT title, type, question, other FROM {$dbprefix}questions WHERE qid='".substr($qqid, 0, strlen($qqid)-1)."'";
$nresult = mysql_query($nquery) or die("Couldn't get text question<br />$nquery<br />".mysql_error());
$nresult = db_execute_num($nquery) or die("Couldn't get text question<br />$nquery<br />".$connect->ErrorMsg());
$count = substr($qqid, strlen($qqid)-1);
while ($nrow=mysql_fetch_row($nresult))
while ($nrow=$nresult->FetchRow())
{
$qtitle=$nrow[0].'-'.$count; $qtype=$nrow[1];
$qquestion=strip_tags($nrow[2]);
Expand Down

0 comments on commit 2dcb03d

Please sign in to comment.