Skip to content

Commit c8acd35

Browse files
authored
Create wp_bbp_forums_part_2.sql
1 parent 689f70b commit c8acd35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
/* Update last_active_id */
3+
UPDATE wp_bbp_forums f
4+
SET f.last_active_id = GREATEST(last_topic_id, last_reply_id);
5+
6+
/* Update last_active_time */
7+
UPDATE wp_bbp_forums f
8+
INNER JOIN wp_posts p ON p.ID = f.last_active_id
9+
SET f.last_active_time = p.post_date;

0 commit comments

Comments
 (0)