function advise_get_advisees

6.x advise.module advise_get_advisees($faculty_id = "")
5.x advise.module advise_get_advisees($faculty_id = "")
3 calls to advise_get_advisees()
advise_can_access_view in modules/advise/advise.module
Used by the menu to determine if the user can see the View tab for the current student.
advise_user_can_view_advising_session_access_callback in modules/advise/advise.module
This is an access callback. Can the user view the advising session specified in the REQUEST?
student_search_query_advisees in modules/student_search/student_search.module
Accepts the SQL, plus an array of parameters compatible with our PDO set up. ex: $params[":name"] = "Bob" and $sql = " SELECT * where name = :name";

File

modules/advise/advise.module, line 295

Code

function advise_get_advisees($faculty_id = "") {
  global $user;
  if ($faculty_id == "") {
    $faculty_id = $user->cwid;
  }

  $rtn = array();

  $res = db_query("SELECT * FROM advisor_student WHERE faculty_id = ?", $faculty_id);
  foreach ($res as $cur) {
    $rtn [] = $cur ["student_id"];
  }


  return $rtn;
}