From 1445a6dc80bc89118bfa8122d426b34b1121b062 Mon Sep 17 00:00:00 2001 From: Thibault Le Meur Date: Tue, 13 Apr 2010 14:10:33 +0000 Subject: [PATCH] Dev fixed browse.php again: SQL queries for response/token JOIN git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8586 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/browse.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/browse.php b/admin/browse.php index 40c6a77bbf4..c8062d51ef8 100644 --- a/admin/browse.php +++ b/admin/browse.php @@ -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 "; @@ -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
$dtquery
".$connect->ErrorMsg()); while ($dtrow=$dtresult->FetchRow()) {$dtcount=$dtrow[0];} if ($limit > $dtcount) {$limit=$dtcount;} @@ -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") @@ -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")