コード例 #1
0
ファイル: UserDAO.php プロジェクト: Shooter75/www
 /**
  * @param $model, User Model
  */
 public function remove($model)
 {
     $id = $model->getId();
     $sql = "DELETE FROM `tbluser`\n                    WHERE `id` = '{$id}'";
     $this->dao = DAO::getInstance();
     if ($this->dao->connection->query($sql) === TRUE) {
         echo "<br>User was success remove from Database!";
     } else {
         echo "<br>ERROR: " . $this->dao->connection->error;
     }
 }
コード例 #2
0
ファイル: SubscriptionDAO.php プロジェクト: Shooter75/www
 /**
  * SubscriptionDAO constructor, get static exemplar
  */
 public function __construct()
 {
     $this->dao = DAO::getInstance();
 }