From 3ac739bd107607cf066ea5574d8fd65afaa31a49 Mon Sep 17 00:00:00 2001 From: Jason Cleeland Date: Sun, 26 Oct 2003 06:46:25 +0000 Subject: [PATCH] Added sql handling (for restricted browses from statistics.php script) git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@750 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/listcolumn.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/admin/listcolumn.php b/admin/listcolumn.php index 89bf6bb3cd2..08ac14f150f 100644 --- a/admin/listcolumn.php +++ b/admin/listcolumn.php @@ -40,6 +40,8 @@ if (!isset($sid)) {$sid=returnglobal('sid');} if (!isset($column)) {$column=returnglobal('column');} if (!isset($order)) {$order=returnglobal('order');} +if (!isset($sql)) {$sql=returnglobal('sql');} + if (!$sid) { //NOSID @@ -52,6 +54,12 @@ } $query = "SELECT id, $column FROM {$dbprefix}survey_$sid WHERE $column != ''"; + +if ($sql && $sql != "NULL") + { + $query .= " AND ".urldecode($sql); + } + if ($order == "alpha") { $query .= " ORDER BY $column"; @@ -60,9 +68,9 @@ $result=mysql_query($query) or die("Error with query: ".$query."
".mysql_error()); echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "\n"; while ($row=mysql_fetch_array($result)) {
"; -echo ""; +echo ""; echo "