Notifications
Clear all

Import Comments with Rating

3 Posts
2 Users
0 Reactions
2,267 Views
nrichard
(@nrichard)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter  

Hello

I need to import some comments with rating from another system to wpDiscuz. Importing data to tables 'wp_comments' and 'wp_commentmeta' (in particular meta custom_field_rating) is not too complicated, but a meta wpdiscuz_rating_count is also needed in table 'wp_postmeta' (this meta summarizes all the ratings for the post).

This is a bit more tricky, is there a way I can calculate this meta afterwards in admin, e.g. by editing post or a comment? As I have approximately 200 posts, this would be acceptable.

Thanks for your help


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4214
 

Hi nrichard,

I'm sorry but there is no an easy way to do this. This requires a PHP code to collect all rating data from source database, then find the correct post in target database and insert according value in wp_postmeta. This is a PHP/MySQL job. I'm sorry but there is no any tool to perform this.


   
ReplyQuote
nrichard
(@nrichard)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter  

Thank you for your answer, I know what I have to do now 😉


   
ReplyQuote
Share:
Scroll to top