From 99f45b9d7440405e0422fde6d89388af4e5b3f96 Mon Sep 17 00:00:00 2001 From: Jason Cleeland Date: Sun, 16 Mar 2003 06:07:18 +0000 Subject: [PATCH] Modified to work with output from statistics script. Note bug seems to exist when exporting abbreviated responses. git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@39 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/export.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/admin/export.php b/admin/export.php index a061d9cefc2..82be95cb203 100644 --- a/admin/export.php +++ b/admin/export.php @@ -47,7 +47,9 @@ echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\n"; echo "\t\n"; @@ -80,6 +82,7 @@ echo "\t\t\n"; echo "\t\n"; echo "\t\n"; + if ($sql) {echo "\t\n";} echo "\t\n"; echo "\t\n"; echo "\t\t
\n"; - echo "\t\t\t$setfontExport Data\n"; + echo "\t\t\t$setfontExport Data"; + if ($sql) {echo " from Statistics Filter";} + echo "\n"; echo "\t\t
\n"; @@ -181,7 +184,14 @@ $legitqs[] = $lw[0]; } $surveytable = "survey_{$sid}"; - $dquery = "SELECT * FROM $surveytable ORDER BY id"; + if ($sql) + { + $dquery = "SELECT * FROM $surveytable WHERE ".stripcslashes($sql)." ORDER BY id"; + } + else + { + $dquery = "SELECT * FROM $surveytable ORDER BY id"; + } $dresult = mysql_query($dquery); $fieldcount = mysql_num_fields($dresult); while ($drow = mysql_fetch_array($dresult))