Пример #1
0
 /**
  * @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 constructor, get static exemplar
  */
 public function __construct()
 {
     $this->dao = DAO::getInstance();
 }