In the judges division groupings, only show the count of projects that are complete or paymentpending

This commit is contained in:
james 2007-03-13 22:11:18 +00:00
parent 174490b752
commit faceec20ed

View File

@ -123,13 +123,16 @@ function get_all_divs()
$x = $cat[$cdl[$id]['cat']];
$y = $divshort[$cdl[$id]['div']];
$z = $div[$cdl[$id]['div']];
$q = mysql_query("SELECT count(id) AS cnt FROM projects WHERE ".
$q = mysql_query("SELECT count(projects.id) AS cnt FROM projects,registrations WHERE ".
" projectdivisions_id='{$cdl[$id]['div']}' ".
" AND projectcategories_id='{$cdl[$id]['cat']}' ".
" AND language='{$cdl[$id]['lang']}' ".
" AND year='{$config['FAIRYEAR']}' ");
" AND registrations.year='{$config['FAIRYEAR']}'".
" AND projects.registrations_id=registrations.id".
" AND (registrations.status='complete' OR registrations.status='paymentpending')");
$r = mysql_fetch_object($q);
echo mysql_error();
$c = $r->cnt;
$cdl[$id]['name'] = "$x $y ({$cdl[$id]['lang']}) ($c project".($c==1?'':'s').")";