Hi, i have this sql query:
mysql_query("SELECT distinct ID, post_title, guid, wp_posts.ID FROM wp_posts WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post' order by wp_posts.ID desc");
then when i try to link the post, the link is in the format http://localhost/?p=1. I’d like the link as the permalink in the blog settings (http://localhost/2011/11/06/hello-world/.
I read in the forum to use get_permalink () but i don’t know how to use it, i get an error!