I have been trying to use wordpress content in non-wordpress pages. PHP retrieves the posts with the query:
SELECT post_title, post_content FROM wp_posts WHERE ID=$postno
On closer inspection it appears most of the content in the database does not include <p> tags, relying on linebreak and return chaacters to delimit paragraphs. But some of the posts do include <p> tags.
I recently upgraded to WP2.6, does the above suggest the database was corrupted in the upgrade?
However, within wordpress all pages display correctly and include <p> tags. Is there some PHP function that adds the necessary formatting to the content retrieved from the database?