Import Comments with Rating  

  RSS

nrichard
Active Member
Joined:2 months  ago
Posts: 8
19/10/2017 11:44 pm  

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


ReplyQuote
Tom
 Tom
Support Team Admin
Joined:3 years  ago
Posts: 2112
23/10/2017 12:06 am  

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.

wpDiscuz Documentation


ReplyQuote
nrichard
Active Member
Joined:2 months  ago
Posts: 8
23/10/2017 3:39 pm  

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


ReplyQuote
  
Working

Please Login or Register