MyBB Community Forums

Full Version: FInd the thread on the database?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

So I actually want to make my site a bit unique and on the home page, I wan't to display updates threads. But I can't seem to find threads that has any text stored in it? I only see tid, uid, pid ect ect.

Where are the text saved? Please help me! Sad
you can find the threads content in "mybb_posts"
The field it is saved in is message in the mybb_posts table.
You need to join the posts table to get the message of that thread post (t.firstpost=p.pid).
(2012-11-09, 07:04 PM)Omar G. Wrote: [ -> ]You need to join the posts table to get the message of that thread post (t.firstpost=p.pid).

How would I call that using a query?

Mine is currently;
$sql = mysql_query("SELECT * FROM mybb_posts WHERE fid='2'");

But it's not working. Sad
Are you trying to pull the latest threads with content? If so have a look at my plugin here for the query and how to display it.

http://community.mybb.com/thread-128532.html
Post your current, working, query here please.
(2012-11-11, 02:31 AM)Omar G. Wrote: [ -> ]Post your current, working, query here please.

The one I posted above is the current and somewhat working..

It does't show latest thread though ... :/
I mean the query that correctly shows the last thread data with no message.