/** * @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; } }
/** * SubscriptionDAO constructor, get static exemplar */ public function __construct() { $this->dao = DAO::getInstance(); }