I have a php page where I am getting latest blog posts from db like this
$result = mysql_query("SELECT * FROM wp_posts ORDER BY ID DESC LIMIT 3")ordie(mysql_error());
Now from here I want to redirect to actual wordpress post
<a href="#" target="_blank"><?php echo $row->post_title; ?></a>
How do I get the permalink? any help? thanks in advance
WordPress generates your URLs instead of storing them,
try this query from Dave Heavy Industries
then you can get the link like