diff --git a/user.inc.php b/user.inc.php index 5caa291a..0730e94b 100644 --- a/user.inc.php +++ b/user.inc.php @@ -97,7 +97,7 @@ function user_load($users_id, $accounts_id = false) if(array_key_exists('participant', $u['roles'])){ $u['emergencycontacts'] = array(); $fields = array('firstname', 'lastname', 'relation', 'phone1', 'phone2', 'phone3', 'phone4', 'email'); - $q = mysql_query("SELECT " . implode(',', $fields) . " FROM emergencycontact WHERE users_id = $users_id"); + $q = mysql_query("SELECT " . implode(',', $fields) . " FROM emergencycontact WHERE users_id = $users_id ORDER BY id"); while($row = mysql_fetch_assoc($q)){ $u['emergencycontacts'][] = $row; }