Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: 1st line of the first post in a topic?


ardentfrost
Member

@ardentfrost

$first_post = $bbdb->get_results("SELECT * FROM $bbdb->posts WHERE topic_id = $topic->topic_id AND post_position = 1");

That will give you the post OBJECT… from there you can pull out the text like this:

echo $first_post->post_text;

Or since it seems you want to pull out just the first little bit, just use a php string function to make it look and act like you want it to.

It’s not the most eloquent method, but it’s certainly simple.

Skip to toolbar