"; echo ""; echo "$i Gtg!"; echo ""; echo ""; echo "
"; $result2 = mysql_query("select count(*),my_tc_user_group.groupname from my_tc_user_group,my_tc_templates where substring(my_tc_templates.template, $today, 1) = 'F' and year = $thisyear and month = $thismonth and my_tc_templates.username = my_tc_user_group.username group by groupname") or die(mysql_error()); while ($row = mysql_fetch_assoc($result2)) { echo "{$row['groupname']}: {$row['count(*)']}
"; } echo "
"; $result3 = mysql_query("select my_tc_templates.username, my_tc_user_group.groupname from my_tc_user_group,my_tc_templates where substring(my_tc_templates.template, $today, 1) = 'F' and year = $thisyear and month = $thismonth and my_tc_templates.username = my_tc_user_group.username group by username order by groupname, username asc ") or die(mysql_error()); $previous = ''; while ($row = mysql_fetch_assoc($result3)) { if($previous != $row['groupname']) {echo "{$row['groupname']}
"; } echo "- {$row['username']}
"; $previous = $row['groupname']; } $result4 = mysql_query("select my_tc_templates.username from my_tc_templates where substring(my_tc_templates.template, $today, 1) = 'D' and year = $thisyear and month = $thismonth") or die(mysql_error()); echo "
The following signed up as Maybe:"; while ($row = mysql_fetch_array($result4)) { $maybe = $row[username]; echo " {$maybe}, "; } ?>