sirAndr3w wrote: Hello i was wondering if there is an addon or a mod that can prune inactive users such as the ones with zero posts or those who haven`t joined the forum in a long while, but without deleting some users that the admin decided to tag with an option like: Don`t purge or something like that, to prevent certain forum admins/moderators from being pruned if they don`t join the forum for a while.
Code: Select all
SQL PROCESSING HALTED
An error was encountered while processing the SQL commands. Further SQL processing has been halted. You may choose to complete the MOD installation anyway and perform the SQL commands manually yourself. However, at this point EM cannot guarantee the MOD will work correctly so you are best off seeking support from the Author before continuing further.
The failed line was:
UPDATE users AS u, phpbb_posts AS p1 LEFT OUTER JOIN phpbb_posts AS p2 ON p1.poster_id = p2.poster_id AND p2.post_time < p1.post_time INNER JOIN phpbb_posts AS p3 ON p3.post_time = p1.post_time SET u.user_firstpost=p3.post_time WHERE p2.post_time IS NULL AND p1.poster_id = u.user_id
SQL Error: 1064
You have an error in your SQL syntax near 'AS u, phpbb_posts AS p1 LEFT OUTER JOIN phpbb_posts AS p2 ON p1.poster_id = p2.p' at line 1
Code: Select all
ALTER TABLE users ADD user_firstpost int(11) NOT NULL
+++ Error: Duplicate column name 'user_firstpost'
UPDATE users AS u, posts AS p1 LEFT OUTER JOIN posts AS p2 ON p1.poster_id = p2.poster_id AND p2.post_time < p1.post_time INNER JOIN posts AS p3 ON p3.post_time = p1.post_time SET u.user_firstpost=p3.post_time WHERE p2.post_time IS NULL AND p1.poster_id = u.user_id
+++ Error: You have an error in your SQL syntax near 'AS u, posts AS p1 LEFT OUTER JOIN posts AS p2 ON p1.poster_id = p2.p' at line 1
UPDATE users SET user_firstpost = user_regdate WHERE user_posts <> 0 AND user_firstpost = 0
+++ Successful
INSERT INTO config (config_name, config_value) VALUES ('zero_count',1),('zero_newest',1),('zero_group',1),('zero_list',1)
+++ Successful
Code: Select all
UPDATE phpbb_users AS u, phpbb_posts AS p1
LEFT OUTER JOIN
phpbb_posts AS p2
ON p1.poster_id = p2.poster_id AND
p2.post_time < p1.post_time
INNER JOIN
phpbb_posts AS p3
ON p3.post_time = p1.post_time
SET u.user_firstpost=p3.post_time
WHERE p2.post_time IS NULL AND
p1.poster_id = u.user_id;
Code: Select all
UPDATE phpbb_users SET (user_firstpost) = SELECT MIN(post_time) FROM phpbb_posts WHERE phpbb_posts.poster_id = phpbb_users.user_id;
1) I'm pretty sure MySQL sounds familiar. Like I said, I'm not really good at this.
2) I don't really know what running a query means, or how to do it. Sad I would need a little help to do that.
3) So, you're saying if I can't get that line working then people will still have their "real" join date when they finally do post? Is that all? Because I'd actually almost like that better. (I'd still be willing to help you find out what happened, though.
Code: Select all
UPDATE users SET (user_firstpost) = SELECT MIN(post_time) FROM posts WHERE posts.poster_id = users.user_id
+++ Error: You have an error in your SQL syntax near '(user_firstpost) = SELECT MIN(post_time) FROM posts WHERE posts.poster_id = user' at line 1
Code: Select all
UPDATE users SET (user_firstpost) = SELECT MIN(post_time) FROM posts WHERE posts.poster_id = users.user_id
+++ Error: You have an error in your SQL syntax near '(user_firstpost) = SELECT MIN(post_time) FROM posts WHERE posts.poster_id = user' at line 1
Code: Select all
<?
phpinfo();
?>