Skip to content
Snippets Groups Projects
Commit 169700f9 authored by Jonathan Putney's avatar Jonathan Putney
Browse files

Fixing issue with SQL to grab department members. Query was using incorrect table alias.

parent dc1e667a
No related branches found
No related tags found
No related merge requests found
......@@ -94,8 +94,8 @@ class Dept {
if(!$this->members && $this->getNumStaff()){
$sql='SELECT m.staff_id FROM '.STAFF_TABLE.' m '
.'WHERE m.dept_id='.db_input($this->getId())
.' AND s.staff_id IS NOT NULL '
.'ORDER BY s.lastname, s.firstname';
.' AND m.staff_id IS NOT NULL '
.'ORDER BY m.lastname, m.firstname';
if(($res=db_query($sql)) && db_num_rows($res)){
while(list($id)=db_fetch_row($res))
if($staff= Staff::lookup($id) && $staff->isAvailable())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment