From 169700f9cbdf596d3e8196ca718eb3eb64aed8dd Mon Sep 17 00:00:00 2001 From: Jonathan Putney <jputney@noverant.com> Date: Tue, 29 May 2012 10:08:08 -0400 Subject: [PATCH] Fixing issue with SQL to grab department members. Query was using incorrect table alias. --- include/class.dept.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.dept.php b/include/class.dept.php index bf82b7652..8061a859a 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -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()) -- GitLab