public function search($req, $arg)
 {
     $db = new POD();
     $p = $db->connect();
     if ($p == false) {
         throw new Exception('Database connect failed');
     }
     $table = 'stu_course';
     $sql = $db->genSearchSql($req, $arg, $table);
     $res = $db->query($sql);
     return $res;
 }
 public function search($req, $arg)
 {
     $db = new POD();
     $p = $db->connect();
     if ($p == false) {
         throw new Exception('Database connect failed');
     }
     $table = 'teacher_identification_info';
     $sql = $db->genSearchSql($req, $arg, $table);
     $res = $db->query($sql);
     $db->close();
     return $res;
 }
 public function search($req, $arg)
 {
     $db = new POD();
     $p = $db->connect();
     if ($p == false) {
         throw new Exception('Database connect failed');
     }
     $table = 'res_group_achievement';
     $sql = $db->genSearchSql($req, $arg, $table);
     $res = $db->query($sql);
     $db->close();
     return $res;
 }
Exemple #4
0
 public function test1Action()
 {
     require $_SERVER['DOCUMENT_ROOT'] . '/school' . '/model/pod.php';
     $db = new POD();
     $p = $db->connect();
     if ($p == false) {
         throw new Exception('Database connect failed');
     }
     $req = array();
     $req[0] = array('key' => 'account', 'account' => '111');
     $arg = array('name', 'account');
     $table = 'Person';
     $sql = $db->genSearchSql($req, $arg, $table);
     $res = $db->query($sql);
     throw new Exception($res[0]['name']);
     return $res;
 }