コード例 #1
0
ファイル: Documents.php プロジェクト: Klym/sp-dnr
 function getLatestDocuments()
 {
     $result = $this->selectLatestStmt->execute();
     if (!$result) {
         throw new \Exception("Ошибка базы данных. Запрос на выборку последних документов не прошел");
     }
     $collection = parent::getCollection($this->selectLatestStmt);
     return $collection;
 }
コード例 #2
0
ファイル: CommitteesDocuments.php プロジェクト: Klym/sp-dnr
 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 = ?");
 }