Announcement

Collapse
No announcement yet.

Post Count Function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Post Count Function

    Hi,

    I was wondering if anyone could tell me how the post count function works in VB3?

    Thanks

    BTW: The function I'm talking about is the one that counts the replies to each thread.

    Like...

    Post #1
    Post #2
    Post #3
    Etc, Etc...

    If someone could just point me to the file where this function is located at that would be great.
    Sinzar
    New Member
    Last edited by Sinzar; Sat 18 Oct '03, 9:01am.

  • #2
    You don't necessarily need to use a function to get the post number. Here's an example:

    PHP Code:
    <?php
     
    $num 
    0;
    $query mysql_query("SELECT * FROM whatever");
     
    while (
    $this mysql_fetch_array($query))
    {
         
    $num++;
         echo 
    $num,"<br>";
         
    // Change the above echo statement to whatever you want.  Use $num to make the number for each thing you output. Remember to eval if you're using a template.
    }
     
    ?>

    Comment


    • #3
      "SELECT count(*) FROM your_table"
      is generally a little better to use.

      Comment


      • #4
        Originally posted by TiLaser
        "SELECT count(*) FROM your_table"
        is generally a little better to use.
        Not what hes talking about

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X