Help with SQL query

KevinL

Active member
Hello

I am trying to import dbtech thanks/likes into post ratings using the supplied query in the first post for the mod (https://xenforo.com/community/threads/post-ratings-taking-likes-to-the-next-level-paid.28475/) The query works fine but it only covers two buttons - thanks and dislike. If I add another part to the query for a third button I get an error. If I break down the query for just the last button (after using the query for the first two buttons) it goes through but doesn't import anything. I am not sure why it is not importing anything. It looks like someone else had the same issue but that was in 2016 and it doesn't looks like they ever got an answer.

This is the last step for our import from vb ==> Xenforo before we can start the upgrade to Xenforo2

The query I am using is as follows.

Code:
insert ignore into XENFORO_DB_NAME.dark_postrating select null, contentid, userid, receiveduserid, if(varname = 'dislike', DISLIKE_RATING_ID, 1), dateline from VBULLETIN_DB_NAME.dbtech_thanks_entry

Any help would be greatly appreciated.

Thanks!
 
Top Bottom