diff --git a/application/tables/ImportrunTable.php b/application/tables/ImportrunTable.php index d18ff626..da3cd6c4 100644 --- a/application/tables/ImportrunTable.php +++ b/application/tables/ImportrunTable.php @@ -33,6 +33,17 @@ class ImportrunTable extends QuickTable ); } + public function count() + { + $db = $this->connection()->getConnection(); + return $db->fetchOne( + $db->select()->from( + array('sub' => $this->getBaseQuery()->columns($this->getColumns())), + 'COUNT(*)' + ) + ); + } + public function getBaseQuery() { $db = $this->connection()->getConnection();