+
+
+
+ public function count_all()
+ {
+ $select = $this->sql->select()->columns(array(
+ 'nb' => new \Zend\Db\Sql\Expression('count(gallery.id)')
+ ));
+
+ // prepare and execute
+ $statement = $this->sql->prepareStatementForSqlObject($select);
+ $result = $statement->execute()->current();
+
+ return $result['nb'];
+ }
+
+ public function getPartial($start, $length, $tri, $senstri, $filtre)
+ {
+ $where = new Where;
+ $where->like('gallery.name', "%{$filtre}%");
+ $where->or;
+ $where->like('gallery.description', "%{$filtre}%");
+
+ return $this->select($where, "{$tri} {$senstri}", $length, $start);
+ }
+
+
+
+