From: James E. F. <jf...@ac...> - 2002-07-10 12:07:12
|
---------- Forwarded message ---------- Date: Wed, 10 Jul 2002 18:39:08 +1000 From: Gary Ashton-Jones <gas...@f2...> To: php...@li... Subject: [phpesp-general] Displaying number of responses We typically have dozens of surveys running at any one time and found it useful to get a quick summary of responses per survey on the 'View Survey Results' page. I put this patch into v1.3 but forgot to send it to mailing list. Here's an updated patch for v1.4 if anyone is interested. It simply adds an extra column ('Resp') of total responses for each survey after 'Owner' and 'Group'. Rgds Gary --- results.inc Wed Jul 10 17:08:45 2002 +++ results.inc.old Wed Jul 10 16:28:58 2002 @@ -97,15 +97,10 @@ <th align="left"><?php echo(_('Title')); ?></th> <th align="left"><?php echo(_('Owner')); ?></th> <th align="left"><?php echo(_('Group')); ?></th> - <th align="left"><?php echo(_('Resp')); ?></th> </tr> <?php while(list($sid,$name,$title,$owner,$realm) = mysql_fetch_row($result)) { - $sql2 = "SELECT count(*) from response where survey_id = $sid"; - $result2 = mysql_query($sql2); - list($resp) = mysql_fetch_row($result2); - if($bg != $ESPCONFIG['bgalt_color1']) $bg = $ESPCONFIG['bgalt_color1']; else @@ -121,7 +116,6 @@ <td><?php echo($title); ?></td> <td><?php echo($owner); ?></td> <td><?php echo($realm); ?></td> - <td><?php echo($resp); ?></td> </tr> <?php } ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Two, two, TWO treats in one. http://thinkgeek.com/sf _______________________________________________ phpESP-general mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/phpesp-general |