forked from science-ation/science-ation
In the judges division groupings, only show the count of projects that are complete or paymentpending
This commit is contained in:
parent
174490b752
commit
faceec20ed
@ -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').")";
|
||||
|
Loading…
Reference in New Issue
Block a user