Hi SanJ,
Thanks for your patience. I went ahead and made this for you.
Updated: Nov 6, 2007
<?php
include('./config.php');
include('./admin.php');
// ListMail login required
if(!islogged()){
header("Location: ./login.php?r=".urlencode(substr($_SERVER['REQUEST_URI'],strrpos($_SERVER['REQUEST_URI'],'/')+1))); exit;
}
echo "<h4>Which followups have the most all-time removes?</h4>
Choose a list: ";
// Loop lists with followups
$fup_rows = mysql_query("select list from $ftable group by list order by list;");
echo "<form method=post><select name=list>";
while(list($flist)=@mysql_fetch_row($fup_rows)){
if($flist==0) continue;
list($ltitle)=@mysql_fetch_row(mysql_query("select title from $ltable where listnum = '$flist';"));
echo "<option value=$flist"; if($list==$flist) echo ' selected'; echo ">List $flist: $ltitle\n";
}
echo "</select> <input type=submit value=View>
<input type=hidden name=submit value=1>
</form>\n";
if($submit){
echo "<hr size=1>\n";
// check counts
$rows=mysql_query("SELECT cseq, count(*) as cnt FROM $utable WHERE list = '$list' and cnf = '2' GROUP BY cseq ORDER BY cnt DESC;");
if(@mysql_num_rows($rows)>0){
echo "<table border=1 cellpadding=3 cellspacing=0>
<tr><td>Count</td><td>Seq #</td><td>Subject</td>\n";
while(list($cseq,$cnt)=mysql_fetch_row($rows)){
list($ftitle)=mysql_fetch_row(mysql_query("select subject from $ftable where list = '$list' and seq = '$cseq';"));
echo "<tr><td>$cnt</td><td>$cseq</td><td>$ftitle</td></tr>\n";
}
echo "</table>\n";
} else {
echo "No results<br>";
}
}
?>
This should remain fairly accurate as all renumbering, followup additions, etc. should take effect for all users on a list regardless of status.
I can't guarantee I will be able to put the same effort in next time - I'm swamped with custom stuff and it's starting to affect LMP development again. :cry:
Regards