diff options
| author | 2013-02-10 13:52:39 +0100 | |
|---|---|---|
| committer | 2013-02-10 13:52:39 +0100 | |
| commit | f528d2c3152e35dcfe66b3bf87322decd847d49d (patch) | |
| tree | 3844b2d815829dd6d687e0dc438e4f27e09b3f00 /app/models/Entry.php | |
| parent | c22fd80f993e82bdefd7c86fbf33c80bf72b9c49 (diff) | |
ajout export au format Uniflux
Diffstat (limited to 'app/models/Entry.php')
| -rwxr-xr-x | app/models/Entry.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php index d434e99f6..4cdcf8265 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -250,12 +250,17 @@ class EntryDAO extends Model_pdo { $res = $stm->fetchAll (PDO::FETCH_ASSOC); $this->nbItems = $res[0]['count']; - $deb = ($this->currentPage - 1) * $this->nbItemsPerPage; - $fin = $this->nbItemsPerPage; + if($this->nbItemsPerPage < 0) { + $sql = 'SELECT * FROM entry' . $where + . ' ORDER BY date' . $order; + } else { + $deb = ($this->currentPage - 1) * $this->nbItemsPerPage; + $fin = $this->nbItemsPerPage; - $sql = 'SELECT * FROM entry' . $where - . ' ORDER BY date' . $order - . ' LIMIT ' . $deb . ', ' . $fin; + $sql = 'SELECT * FROM entry' . $where + . ' ORDER BY date' . $order + . ' LIMIT ' . $deb . ', ' . $fin; + } $stm = $this->bd->prepare ($sql); $stm->execute (); |
