Quote:
Originally Posted by tpearl5
One like = one helpful answer vote. There are no down votes. There was an importer for this mod for the likes. This was the query:
PHP Code:
"select p.postid,p.userid,ha.dateline as date,ha.userid as whoadded,hp.threadid,u.username,l.l_contentid ". "from ".vbseo_tbl_prefix('helpfulanswer')." ha inner join ".vbseo_tbl_prefix('post')." p on (ha.postid = p.postid) ". "inner join ".vbseo_tbl_prefix('helpfulpost')." hp on (ha.postid = hp.postid) ". "inner join ".vbseo_tbl_prefix('user')." u on (ha.userid = u.userid) ". "left join ".vbseo_tbl_prefix('vbseo_likes')." l on l_ctype=1 and l_contentid=p.postid and l_from_userid=ha.userid ". "where ha.yesno = 1";
|
Very Cool.
Just remember, there's 3 bits of logging involved in votes:
helpfulpost - which stores the post level totals (so we don't have calculate every load)
helpfulanswer - which records the votes (so we know every detail to report / manage)
and then a record on the user level (for profile views)