Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Post Count?

  1. #11
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Unhappy

    so i have to look through my mysql db's till i find the category ids? arent they displayed when you click them? and when i do find them what would i do next?
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #12
    Join Date
    Apr 2005
    Posts
    4,963
    Tokens
    0

    Latest Awards:

    Default

    Just count how many people have posted them then keep them updated to save stress cause some people might post in a certain section and it might not be a tutorial "/

  3. #13
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    ok heres a simple thing that can do it

    athogh ypu would need a database connection to your douems database


    PHP Code:
    <?php
      
    //Get all the topics where there in forum with id 5
    $sql mysql_query("SELECT tid FROM ibf_topics WHERE forum_id='5'");
    //count them
    $result mysql_num_rows($sql);
    //output
    echo $result;
    ?>

    Now the above will output how many topics are in the forum with the id 5, chnage the 5 in the exsample for the id of the forum you want to copyu topics in

    (wrote in hurry so could be errors)

  4. #14
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    nothing at all appeared what do i need to configure from that just change forum_id to the category number?
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  5. #15
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Exclamation

    i always get ignored :@ *bump*
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  6. #16
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    no to the actal number of that forum. Also you need a db connection on the page your trying to quiry from

  7. #17
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    so what i need to add

    PHP Code:
    //MySQL Hostname
    $hostname 'localhost';

    //MySQL Database Username
    $sqlname 'my username';

    //MySQL Database Password
    $sqlpass 'password';

    //MySQL Database Name
    $mysqldb 'db name'
    to that code you gave me?
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  8. #18
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    add this above it

    PHP Code:
    <?php



    $dbh 
    mysql_connect ("localhost"" DATABASE USER "" DATABASE NAME ") or die ('DB error due to: ' mysql_error());

    mysql_select_db (" DATABASE NAME ");

    ?>

  9. #19
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    so in the end it will look like this?

    PHP Code:
    <?php
    $dbh 
    mysql_connect ("localhost""USER_DB""DB") or die ('DB error due to: ' mysql_error());
    mysql_select_db ("DB");
    //Get all the topics where there in forum with id 5
    $sql mysql_query("SELECT tid FROM ibf_categories WHERE id='3'");
    //count them
    $result mysql_num_rows($sql);
    //output
    echo "$result";
    ?>
    this is what im usin now and its not workin still (i changed the DB parts though)

    in phpmyadmin this is what i found in ibf_categories on the tutorial one
    id position state name

    3 7 1 Tutorials
    Last edited by L@c0ste; 03-07-2005 at 07:46 PM.
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  10. #20
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    OK easyer way to find out the forum is go in to the form conting the tutorials, and look at the id of it at the top, from the index.php?showforum=5 athogh what ever number u get there being the correct id of ythe forum

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •