function __construct(\PDO $pdo) { parent::__construct($pdo); $this->select = $this->pdo->prepare("SELECT *, DATE_FORMAT(`date`, '%d.%m.%Y в %H:%i') AS date FROM documents WHERE committee = ?"); }
function __construct(\PDO $pdo) { parent::__construct($pdo); $this->select = $this->pdo->prepare("SELECT *, DATE_FORMAT(`date`, '%d.%m.%Y в %H:%i') AS date FROM documents ORDER BY date DESC"); $this->selectLatestStmt = $this->pdo->prepare("SELECT *, DATE_FORMAT(`date`, '%d.%m.%Y в %H:%i') AS date FROM documents ORDER BY date DESC LIMIT 4"); }