Okay, I'm sure I'm starting to annoy you guys by now
What I'm trying to do is make a link at the bottom of my blog entries (because they are going to be trimmed to the first, say 200 words and then if they go beyond that display a "read more" link. This link I want to end up looking something like: http://www.mysite.com/blog/index.php?id=xxx
And on that page, it will only display that one blog entry. How would I go about doing this?
Here is my current code for displaying the blog entries:
Code:
<?php
mysql_connect($host,$user,$pass) or die("ERROR:".mysql_error());
mysql_select_db($database) or die("ERROR DB:".mysql_error());
$query = "SELECT * FROM blog WHERE categories LIKE '%Movies%' AND disclude_categories!=1 UNION SELECT * FROM news WHERE categories LIKE '%Movies%' AND disclude_categories!=1 UNION SELECT * FROM reviews WHERE categories LIKE '%Movies%' AND disclude_categories!=1 ORDER BY date DESC LIMIT 0,$movies_limit";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) { /* while loop to return everything in the column */
echo "<h2>",$row['title'],"</h2>","<p>","by: ",$row['author'],"</p>","<br />","<p>",$row['content'],"</p>"; /* return title, author and content and use css formatting */
echo "<br /><br />"; /* drop down a few lines after every post */
}
?>
|