public function deleteTable($table)
 {
     $con = new DbCon();
     $con->open();
     $sql = "drop table {$table}";
     $rs = mysql_query($sql);
     /* if(!$rs){
            throw new Exception("drop table failed!");
        } */
     $con->close();
     return $rs;
 }
 public function selectPassword($id)
 {
     $con = new DbCon();
     $con->open();
     $sql = "select * from Passwords where user_id={$id}";
     $rs = mysql_query($sql);
     $rows = mysql_num_rows($rs);
     $results = mysql_fetch_row($rs);
     if ($rows != 0) {
         return $results;
     } else {
         return false;
     }
     $con->close();
 }
Beispiel #3
0
 public function getDbCon()
 {
     if (!$this->dbCon) {
         $this->dbCon = DbCon::getDbcon();
     }
     return $this->dbCon;
 }