Replies

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Veljo
Registered User
Posts: 51
Joined: Wed Aug 17, 2005 6:58 am

Replies

Post by Veljo » Sun Jun 29, 2008 3:02 am

Just a quick request for someone who can help me. I don't think this is too difficult (well I hope not), but is there a quick PHP statement I can use to fetch the number of replies from a certain topic ID?

Eg. Blah blah (6 replies)

ie. Blah blah ({echo replies from topic number 4425} replies)

Thanks in advance :)

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: Replies

Post by drathbun » Sun Jun 29, 2008 1:05 pm

Code: Select all

select topic_replies from phpbb_topics where topic_id = X
Replace 'X' with the topic_id in question. The usefullness of this answer is related to the amount of detail you provided in your question. :) If you had provided more detail about what you're trying to do, you could get more help.

Moving to MOD Requests for further responses, thanks.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

Veljo
Registered User
Posts: 51
Joined: Wed Aug 17, 2005 6:58 am

Re: Replies

Post by Veljo » Mon Jun 30, 2008 7:21 am

Okay, say I have headings like this:

News story 1 (X comments)
News story 2 (X comments)
News story 3 (X comments)

Say each news story is a topic heading. I need a script that will allow me to write the News story's heading in with html, then have how many replies topic number XXX has to put after it.

In other words,

NEWS STORY 1 <?php echo how many replies are in topic with id number 4922 ?> Comments

User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: Replies

Post by dellsystem » Wed Jul 02, 2008 3:26 pm

Topics Anywhere (http://www.afsvlaanderen.be/topics_anyw ... wnload.php) has that capability.

If you prefer to use a SQL query then drathbun's suggestion will work perfectly.
Former moderator and website team member | My MODs, and more (GitHub)

Post Reply

Return to “[2.0.x] MOD Requests”

Who is online

Users browsing this forum: No registered users and 2 guests