コード例 #1
0
 public function execute()
 {
     if (!count($this->condition)) {
         $total_rows = $this->connection->query('SELECT COUNT(*) FROM {' . $this->connection->escapeTable($this->table) . '}')->fetchField();
         parent::execute();
         return $total_rows;
     } else {
         return parent::execute();
     }
 }
コード例 #2
0
ファイル: Delete.php プロジェクト: aWEBoLabs/taxi
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     $this->connection->addSavepoint();
     try {
         $result = parent::execute();
     } catch (\Exception $e) {
         $this->connection->rollbackSavepoint();
         throw $e;
     }
     $this->connection->releaseSavepoint();
     return $result;
 }