public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $req = array(); $req[0] = array('Course_ID', $this->Course_ID); $table = 'course'; $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'message'; //######################### $req = array('message_id' => $this->message_id); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'stu_evaluate'; //######################### $req = array(); $req[0] = array('Stu_ID' => $this->Stu_ID, 'Course_year_term' => $this->Course_year_term); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'stu_union_member'; //######################### $req = array(); $req[0] = array('Group_ID' => $this->Group_ID, 'Stu_ID' => $this->Stu_ID); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'teacher_identification_info'; //######################### $req = array(); $req[0] = array('Tea_ID' => $this->Tea_ID); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'res_group_log'; //######################### $req = array(); $req[0] = array('Log_ID' => $this->Log_ID); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function update($arg) { $db = new POD(); $p = $db->connect(); if ($p == false) { throw new Exception('Database connect failed'); } $table = 'financial_account'; //######################### $req = array(); $req[0] = array('Money_id' => $this->Money_id); $sql = $db->genUpdateSql($req, $arg, $table); $db->query($sql); $db->close(); }
public function showScoreAction() { $sql1 = "select c.Course_ID,c.Course,sc.Score,c.Property,c.credit,c.intro from Course as c,Stu_Course as sc where c.Course_ID = sc.Course_ID and c.Course_year_term = {$_POST['Course_year_term']} and sc.Stu_ID = {$_POST['Account']}"; require_once $_SERVER['DOCUMENT_ROOT'] . '/school' . '/model/pod.php'; $pod = new POD(); $pod->connect(); $result = $pod->query($sql1); foreach ($result as $key => $value) { $where = $result[$key]['Course_ID']; $sql2 = "select Stu_ID from Stu_Course where Course_ID='{$where}' order by Score desc"; $ids = $pod->query($sql2); foreach ($ids as $rank => $id) { if ($id['Stu_ID'] == $_POST['Account']) { $result[$key]['rank'] = $rank + 1; break; } } } $pod->close(); return json_encode($result); }