Quick and dirty Test verifier
0) {
require_once("includes/db_connect.inc");
$statement="SELECT t.t_id, t.topic, ".
" (SELECT max(lp.date) FROM learnprogress lp WHERE lp.t_id=t.t_id AND lp.user_id='$CertSerial' AND lp.percentage >= t.percentage) Time ".
"FROM topics t ".
"WHERE EXISTS(SELECT 1 FROM learnprogress lp WHERE lp.user_id='$CertSerial' AND lp.t_id=t.t_id AND lp.percentage >= t.percentage)";
$query = mysql_query($statement);
echo "Passed tests by certificate '$CertSerial'
\n";
echo "TopicID | TopicName | Last Success |
\n";
while($row = mysql_fetch_assoc($query)) {
echo "".$row['t_id']." | ".$row['topic']." | ".$row['Time']." |
\n";
}
echo "
\n";
}
?>