vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Query for postcount of a post? (https://vborg.vbsupport.ru/showthread.php?t=181026)

superjeff 05-30-2008 03:37 PM

Query for postcount of a post?
 
Hi all, i'd like to make a query to take the postcount of a specific post having its id.
For example, this is the post 1536335 and knowing this i'd like to know the postcount in the thread.
Any ideas?

Marco van Herwaarden 05-31-2008 07:35 AM

Sorry i don't understand. The 'postcount' of a single post is always 1.

superjeff 05-31-2008 12:28 PM

I'd like to do a query that "replay" me 2 if, for exemple, i ask for post 1536862 (yours)

Lynne 05-31-2008 02:25 PM

So basically, given the postid, you want to find out how many posts are in the thread that contains that postid?

superjeff 05-31-2008 03:30 PM

No.. this is to easy :)
given the postid, i want to find out the postcount of the postid.

Thanks

Lynne 05-31-2008 05:18 PM

OK, I think I see. Your post above me is postid 1537117 and it has a postcount of 5 in this thread. Writing the query really depends on where you want to use this information because obviously it is already available to you in this thread.

superjeff 06-01-2008 07:18 AM

The only usefull variable cached are the postid and the threadid

Marco van Herwaarden 06-01-2008 08:54 AM

You would need to count the number of posts in the thread that have a dateline <= to the post you are looking for.


All times are GMT. The time now is 03:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01011 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete