View Single Post
Old 12-13-2005   #11 (permalink)
ParaSnake
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
ehhh,sorry to let you wait for 4 days,i was too busy at school that i forget this lolz
Here what i`ve tested,it works very well...
PHP Code:
//Connect to database
mysql_connect("localhost","username","password")or die(mysql_error());
mysql_select_db("wordpress");

//The currently max ID in ur database means your newest post
$a mysql_query("SELECT MAX(ID) FROM wp_posts") or die(mysql_error());
$b mysql_fetch_assoc($a);
$maxID $b['MAX(ID)'];

$a mysql_query("SELECT * FROM wp_posts WHERE ID ='".$maxID."' ") or die(mysql_error());
$b mysql_fetch_assoc($a);

$date    $b['post_date'];
$content $b['post_content'];
$title   $b['post_title']; 
What you have to do is to echo the date,content and title anywhere you want,and it will output the nweest entry in ur blog.Hope it matched ur idea
__________________
ParaSnake is offline