FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to get messages from a particular forum
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to get messages from a particular forum [message #30638 is a reply to message #30591] Mon, 06 March 2006 16:01 Go to previous messageGo to previous message
acollins22 is currently offline  acollins22   United Kingdom
Messages: 11
Registered: June 2005
Location: Leicestershire, England
Karma:
Junior Member
Hi Ilia,

Thanks for the reply. I've been having a look at this but I'm a bit of a newbie here.

As a QnD hack I've tried this code in my SQL console.
SELECT fud26_msg.id as id
	FROM fud26_thread, fud26_msg
	WHERE fud26_msg.id = fud26_thread.id AND fud26_msg.apr = 1 AND fud26_thread.forum_id = 2
	ORDER BY id DESC


That works fine but if I put that code into my version of fetch_forum_msg it's no-go.

function fetch_forum_msg($arg=5)
{
$range = time() - 86400 * (float) $arg;

return _fud_msg_multi(0, "SELECT fud26_msg.id as id
	FROM fud26_thread, fud26_msg
	WHERE fud26_msg.id = fud26_thread.id AND fud26_msg.apr = 1 AND fud26_thread.forum_id = 2
	ORDER BY id DESC");
}

(I know this is a hack but I'm just trying to prove a point at first.)

If I look at _fud_msg_multi it's already doing a join, can I use that.

Sorry to be a bit vague here but I'm really out of my depth (though I'm learning fast). Please could you be more specific for me?


Thanks.

Andy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: login name
Next Topic: PHP includes
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 13:58:26 GMT 2024

Total time taken to generate the page: 0.03842 seconds