Fix bad query when checking for already solved exercice

This commit is contained in:
nemunaire 2014-11-20 21:02:29 +01:00
parent b02c823f9e
commit 89c2c4a2dc

View File

@ -187,7 +187,7 @@ for my $f (readdir $dh)
if (! @$row[0] || $sth->rows)
{
# Check if the team has not already solved this exercice
$sth = query($dbh, "SELECT S.id FROM solved S WHERE S.id_exercice = ".$dbh->quote($exercice));
$sth = query($dbh, "SELECT S.id FROM solved S WHERE S.id_team = $team AND S.id_exercice = ".$dbh->quote($exercice));
if (! $sth->rows)
{
say "resetresetreset:TEAM$team,$theme:SYNCSYN:TEAM$team:SYNC:HOME:SYNC:all:DS";