forked from science-ation/science-ation
Show the school list sorted alphabetically, and if two schools ahve the same name, put the city after teh school name in brackets.
This commit is contained in:
parent
b807381418
commit
cbfd619af7
@ -221,10 +221,15 @@ else
|
||||
<select name="schoolid">
|
||||
<option value=""><?=i18n("Choose your school")?></option>
|
||||
<?
|
||||
$q=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."'");
|
||||
$q=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY school");
|
||||
$prev="somethingthatdoesnotexist";
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
if($r->school==$prev)
|
||||
echo "<option value=\"$r->id\">$r->school ($r->city)</option>\n";
|
||||
else
|
||||
echo "<option value=\"$r->id\">$r->school</option>\n";
|
||||
$prev=$r->school;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user