Reputation: 13
How can I have my php page only return rows with a certain id. I am working on a webpage set up like a blog, i post using mysql, i it to only show entries with the id of 1, so i don't have to worry about deleting old posts or having 100 posts on 1 page.
<?php
include ("includes/includes.php");
$blogPosts = GetBlogPosts();
foreach ($blogPosts as $post)
{
echo "<div class='post'>";
echo "<h2>" . $post->title . "</h2>";
echo "<p>" . $post->post . "</p>";
echo "<br />";
echo "<span>Posted By: " . $post->author . "  Posted On: " . $post->datePosted . "  Tags: " . $post->tags . "</span>";
echo "</div>";
}
?>
Upvotes: 1
Views: 84