Exemplo n.º 1
0
 public function add()
 {
     $this->con = DbConn::initDb();
     $table = 'admin';
     $arr = array('username' => $this->name, 'password' => $this->password);
     $str = DbConn::table_insert('admin', $arr);
     $result = mysql_query($str, $this->con);
     if ($result) {
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
 function userinfo_insert($arr)
 {
     $str = DbConn::table_insert('userinfo', $arr);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }
Exemplo n.º 3
0
 function token_insert($arr)
 {
     $str = DbConn::table_insert('`token`', $arr);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }
Exemplo n.º 4
0
 function keyword_update($arr, $condition)
 {
     $str = DbConn::table_insert('keyword', $arr, $condition);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }
Exemplo n.º 5
0
 function iteminfo_insert($string)
 {
     $str = DbConn::table_insert('iteminfo', $string);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }
Exemplo n.º 6
0
 function table_delete($condition)
 {
     $str = DbConn::table_insert('parentinfo', $condition);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }
Exemplo n.º 7
0
 function subject_update($arr, $condition)
 {
     $str = DbConn::table_insert('subject', $arr, $condition);
     $this->con = DbConn::initDb();
     return mysql_query($str, $this->con);
 }