function loadClassroomInfo($id) { $res = array(); require_once $GLOBALS["where_lms"] . "/lib/lib.classlocation.php"; $clm = new ClassLocationManager(); $qtxt = " SELECT * " . " FROM " . $this->_getMainTable() . " as t1, " . $clm->getClassLocationTable() . " as t2 " . " WHERE t1.location_id = t2.location_id " . "\tAND t1.idClassroom='" . (int) $id . "' "; $qtxt .= "ORDER BY t1.name "; $q = $this->_executeQuery($qtxt); if ($q && mysql_num_rows($q) > 0) { $res = mysql_fetch_array($q); } return $res; }