member doesn't need to be a member of this project in the first place,
need to investigate the junction relation instead of the primary
project field only.
{
global $dbh;
- $query = sprintf ("SELECT COUNT(*) FROM person WHERE project = '%s' AND list = 0", $project);
+ $query = sprintf ("SELECT COUNT(*) FROM person,junction WHERE person = name "
+ ."AND junction.project = '%s' AND list = 0", $project);
$sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
if (pg_NumRows ($sth) > 0) {
return $row[0];
}
}
-?>
\ No newline at end of file
+?>