Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <?php
- include('includes/FluentPDO/FluentPDO.php');
- $pdo = new PDO("mysql:host=localhost;dbname=kncms;charset=utf8", "root", "",array(
- PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
- ));
- $fpdo = new FluentPDO($pdo);
- $query = $fpdo->from('comments')->select(array('author', 'email', 'comment', 'comment_date'))->where('page_id', 3);
- foreach ($query as $row) {
- $time = date("d/m/Y",strtotime($row['comment_date']));
- $c = htmlentities($row['comment'], ENT_COMPAT, 'UTF-8');
- echo "{$row['author']} {$row['email']} {$c} {$time} <br />";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement