Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $connection = new Connection;
- $connection->connect();
- $connection->runQuery("SELECT * FROM `news_posts` ORDER BY `date` DESC LIMIT $start , $count");
- while($row = mysql_fetch_array($connection->getResult()))
- {
- $post = new BlogPost;
- $post->setDetailsFromRow($row);
- echo $post->getGeneratedPostHtml();
- }
- $connection->freeResult();
- $connection->close();
Advertisement
Add Comment
Please, Sign In to add comment