 |
@mysql_connect("localhost", "root", "a7RPk2H4") or die("Could not connect to server");
@mysql_select_db("rljackson_blog") or die("Could not select database");
$query = "SELECT post_title, post_content, id, post_author, DATE_FORMAT(post_date , '%d %M %Y') as post_date_formated
FROM b2posts
ORDER BY post_date DESC
LIMIT 0, 3";
$result = mysql_query($query);
while(list($post_title, $post_content, $id, $post_author, $post_date) = mysql_fetch_row($result)) {
?>
"> echo $post_title; ?>
echo substr(strip_tags(stripslashes($post_content)), 0, 20);
if(strlen(strip_tags(stripslashes($post_content))) > 20){
echo "...";
} ?>
|
} ?>
|