Quote:
Originally Posted by ryancooper
Does anyone know how to include the latest posts (only found in the post title) of the page your are on?
Example I am browsing a page called Space mountain - I would like to have on that page the last 5 posts that have Space mountain in the title of the post?
I know I can make a web query for just Space Mountain and inclue it but then I would have to have a query for every search term. Is there a way to have it show the $WT_PageName% in the Query?
I did try
Code:
SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE taglist LIKE '$WT_PageName%'
ORDER BY dateline DESC
LIMIT 5
and that did not work  Thanks!
|
$WT_PageName variable can be used in WebQueries, I don't see a problem with this.
I believe your query is somehow wrong. Can you run the same query in phpmyadmin and return valid results with it?
There are certain things you need to check. Eg. your WHERE query is checking the keyword in "taglist" field, not title. I'm not sure if this is intentional. Also when you use '$WT_PageName%' instead of "'%$WT_PageName%'" you are querying results that begins with $WT_PageName rather than including.