function getMyInstitutes($id)
{
    $conn = getMainConnection();
    $list = array();
    $temparray = array();
    $temparray = explode(";", $id);
    foreach ($temparray as $t) {
        $temp = getInstitute($t);
        array_push($list, $temp);
    }
    if (count($list) != 0) {
        return $list;
    }
    return NULL;
}
Пример #2
0
 function getInstituteObj()
 {
     return getInstitute($this->getClassID());
 }
Пример #3
0
function updateMainStudentNumber($mainID, $phone_stu)
{
    $conn = getMainConnection();
    $query = "SELECT * FROM `studentinstituteid` WHERE `studentID` = '" . $mainID . "'";
    $result = mysql_query($query, $conn);
    $rows = mysql_num_rows($result);
    if ($result) {
        while ($member = mysql_fetch_array($result)) {
            $tempObj = getInstitute($member['instituteID']);
            $con1 = getTemporaryConnection($tempObj->getDatabaseName());
            $query1 = "UPDATE `student` SET `phone_stu` = '" . $phone_stu . "' WHERE `mainID` = '" . $mainID . "'";
            $result1 = mysql_query($query1, $con1);
        }
        $conn = getMainConnection();
        $query1 = "UPDATE `student` SET `phone_stu` = '" . $phone_stu . "' WHERE `ID` = '" . $mainID . "'";
        $result1 = mysql_query($query1, $conn);
    }
}