Direct SQL query / text formatting
-
Hi. I hope this is the right forum (it’s my first time here!).
I have a wordpress blog. I’d like to access certain excerpts from my blog on other pages on my website. E.g. I want my XNA page to show the name of all blog entries with the XNA tag.
I’ve managed to do this doing some direct SQL queries. Is that the right way to do so? Or is there an easier way?
Anyway, having done so, I’ve noticed that some of the text formatting is funny. E.g. one post shows as:
Anyway, I’ve made some progress with CSS and PHP. I’ve written some basic functions to help me with my page
in my blog but
Anyway, I’ve made some progress with CSS and PHP.� I’ve written some basic functions to help me with my page
in my query. I’m not sure where the square has come from, or how to get rid of it!
My query is
Select wp_positronicposts.ID, wp_positronicposts.post_title, wp_positronicposts.post_content
from wp_positronicposts, wp_positronicterm_relationships
where 1=1
and wp_positronicposts.post_status = ‘publish’
and wp_positronicterm_relationships.object_id = wp_positronicposts.ID
and wp_positronicterm_relationships.term_taxonomy_id = 5
order by wp_positronicposts.ID descAny pointers? Direct links are:
http://www.games.acemuzzy.com/blog/?cat=5
http://www.games.acemuzzy.com/games/adventuregame.php
The topic ‘Direct SQL query / text formatting’ is closed to new replies.