Skip to content

Commit

Permalink
Dev fixed browse.php again: SQL queries for response/token JOIN
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8586 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Apr 13, 2010
1 parent a344070 commit 1445a6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/browse.php
Expand Up @@ -375,7 +375,7 @@
//LETS COUNT THE DATA
if ($surveyinfo['private'] == "N")
{
$dtquery = "SELECT count(*) FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.tid ";
$dtquery = "SELECT count(*) FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.token ";
} else
{
$dtquery = "SELECT count(*) FROM $surveytable ";
Expand All @@ -388,7 +388,7 @@
{
$dtquery .= " WHERE submitdate IS NOT NULL ";
}
$dtresult=db_execute_num($dtquery);
$dtresult=db_execute_num($dtquery) or safe_die("Couldn't get response data<br />$dtquery<br />".$connect->ErrorMsg());
while ($dtrow=$dtresult->FetchRow()) {$dtcount=$dtrow[0];}

if ($limit > $dtcount) {$limit=$dtcount;}
Expand All @@ -399,7 +399,7 @@
if ($_POST['sql'] == "NULL")
{
if ($surveyinfo['private'] == "N")
$dtquery = "SELECT * FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.tid ";
$dtquery = "SELECT * FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.token ";
else
$dtquery = "SELECT * FROM $surveytable ";
if (incompleteAnsFilterstate() == "inc")
Expand All @@ -415,7 +415,7 @@
else
{
if ($surveytable['private'] == "N")
$dtquery = "SELECT * FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.tid ";
$dtquery = "SELECT * FROM $surveytable LEFT JOIN $tokentable ON $surveytable.token = $tokentable.token ";
else
$dtquery = "SELECT * FROM $surveytable ";
if (incompleteAnsFilterstate() == "inc")
Expand Down

0 comments on commit 1445a6d

Please sign in to comment.