FYI i found the answer on a post half way down the page here.
Simple really. I was over complicating things
<?php
$query = "SELECT post_title, post_name FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 5";
$result = mysql_query($query,$dblink);
if(mysql_num_rows($result)) {?>
<ul>
<?php while($post = mysql_fetch_assoc($result)) {?>
<li><a href="/blog/<?php echo $post['post_name'] ?>"><?php echo stripslashes($post['post_title']); ?></a></li>
<?php }?>
</ul>
<?php }
?>