Not Reviewed
Show More
Add another comment
| @@ -20,7 +20,7 $perpage = 15; | |||
|
|
20 | 20 | $start = ($page - 1) * $perpage; |
|
|
21 | 21 | |
|
|
22 | 22 | $total = ceil( $dbConnection->fetchColumn('SELECT COUNT(url_name) FROM static_page') / $perpage ); |
|
|
23 | $pages = $dbConnection->fetchAll('SELECT url_name, pubdate, status, title, body FROM static_page ORDER BY url_name ASC LIMIT ?, ?', array($start, $perpage)); | |
|
|
23 | $pages = $dbConnection->fetchAll('SELECT url_name, pubdate, status, title, body FROM static_page ORDER BY url_name ASC LIMIT ?, ?', array($start, $perpage), array(PDO::PARAM_INT, PDO::PARAM_INT)); | |
|
|
24 | 24 | |
|
|
25 | 25 | pagination( $page, $total ); |
|
|
26 | 26 | |
| @@ -20,7 +20,7 $perpage = 15; | |||
|
|
20 | 20 | $start = ($page - 1) * $perpage; |
|
|
21 | 21 | |
|
|
22 | 22 | $total = ceil( $dbConnection->fetchColumn('SELECT COUNT(id) FROM rant') / $perpage ); |
|
|
23 |
$rants = $dbConnection->fetchAll('SELECT r.id, UNIX_TIMESTAMP(r.published) AS published, c.name, r.title, |
|
|
|
23 | $rants = $dbConnection->fetchAll('SELECT r.id, UNIX_TIMESTAMP(r.published) AS published, c.name, r.title, r.body, r.status FROM rant r JOIN contributor c ON r.author = c.id ORDER BY r.id DESC LIMIT ?, ?', array($start, $perpage), array(PDO::PARAM_INT, PDO::PARAM_INT)); | |
|
|
24 | 24 | |
|
|
25 | 25 | pagination( $page, $total ); |
|
|
26 | 26 | |
Comments 0
You need to be logged in to leave comments.
Login now
