I am currently running a SMF forum and I created a new column in my "smf_members" table called "gcposts." Each time this is executed in Subs-Post.php: // Increase the post counter for the user that created the post. if (!empty($posterOptions['update_post_count']) && !empty($posterOptions['id'])) { // Are you the one that happened to create this post? if ($ID_MEMBER == $posterOptions['id']) $user_info['posts']++; updateMemberData($posterOptions['id'], array('posts' => '+')); } I want the "gcposts" column to be increased by 1 based on the member who made the post. What would I add within the { } tags to do this, and would anything else need to be added anywhere to update the "gcposts" column? For example, would "gcposts" have to be added to the $user_info array? If so, where do I add this at? Thanks!
Add this : db_query("UPDATE LOW_PRIORITY `smf_members` SET `gcposts` = `gcposts` + 1 WHERE `ID_MEMBER` = $ID_MEMBER LIMIT 1", __FILE__,__LINE__); PHP:
Does that get added within the if statement or outside of it? Also, what code do I need to add if I were to delete a number from that table? (example: whenever posts are removed from the forum a query is executed to remove the post numbers and post data).