User Post Count

$cripts$cripts BeginnerLink Clerk
Hey im urrently working on a pretty huge project called MGC or Mulit-Gaming-Clan Script and im in stage 2 of development which is mostly the user system and intergrated forums one problem ive ran into is getting the post count for a user when they submit a new post the way ive thought about doing it was just taking the post count they have and adding 1 to it....now i know that would work but i wont to have it so eah post they submit has there own id so i can call that later for other features....ive been thinking of a few ways to do this im thinking of setting up a table with all user posts and then having all posts submited to that and retrieving them that way im preatty sure thats a good way to do it wutta yall say on this

and wuts the best way to encrypt my source ive been looking at Mcrypt but it looks omplicated.....and im not sure if i would be able to encrypt the source code and have the file still be useable....and i dont have couplea hundred dollars to spend on a ecryption script

Comments

  • PythonPython Forum Leader The Royal RAM
    Ok, from what I understand youve got a script where users make posts and then in a database table the users id is set for when he/she posts

    the best way in my opinion to count the number of posts a user has made is to do mysql_num_rows()

    Like this:
    [PHP]$result = mysql_query("SELECT * FROM `posts` WHERE `authorid` = $userid");
    $numposts = mysql_num_rows($result);[/PHP]

    I think thats correct.
    Is this what your wanting to do?

    The Royal Ram

  • $cripts$cripts Beginner Link Clerk
    lol thnx i know how to get the number of rows that are in a table i was just wondering if that was a good way of doing it and if there are any other ways of doing it as far as wut tables you use and wut not
Sign In or Register to comment.