Hi,
Ratings are not stored in a specific DB table. They are stored as Post Meta Data in a serialized array for each post. In your $GLOBALS['wpdb']->postmeta table you’ll find them under the meta_key _ideastream_rates.
As a result when an idea is deleted, the corresponding ratings are also deleted.
Thanks. I found it now. But, the value is not clear for me.
Is there any guide to understand the syntax of the meta_key?
How do I know how many points given to the idea by which users? The reason to learn the syntax is that we have used another system to review and evaluate the ideas. Now, we are trying to move past ideas and ratings to the new environment.
a:0:{}
a:1:{i:5;a:1:{s:8:”user_ids”;a:1:{s:3:”u-4″;i:4;}}}
You can use this function :
wp_idea_stream_add_rate( $idea = 0, $user_id = 0, $rate = 0 )
where $idea is the ID of the idea, and $rate the number of stars.
You can also do var_dump( get_post_meta( $idea_ID, '_ideastream_rates', true ) ); to see the structure of the array.
It’s a multidimensional array having number of stars as keys and the array of user ids as values for each key (star).
Thanks a lot. I can modify the current ratings.