Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cdb = new PDO('mysql:dbname=xxx;host=localhost', 'xx', 'xx');
- foreach ($cdb->query("SELECT c.*, i.hash FROM comments AS c LEFT JOIN images AS i ON (c.image_id = i.id) ORDER BY c.posted DESC LIMIT 5") AS $com)
- {
- echo '<img src="booru/timthumb.php?src=images/' . substr($com['hash'], 0, 2) . '/' . $com['hash'] . '&h=48&w=48&q=100" width="48px" style="border-style: none"/> <a href="http://animelon.com/booru/post/view/' . $com['image_id'] . '">' . $com['comment'] . '</a><br />';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement