1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RM 1.0 SQL query to import reviews into RM

Discussion in 'Resource Manager Support' started by Andy.N, Apr 8, 2013.

  1. Andy.N

    Andy.N Well-Known Member

    I have many pre-existing reviews which I'd like to import into Resource Manager.
    Can the SQL experts (Jake specially) provide a query to import into a specific resource

    Something like

    insert into table xf_resource
    where resource_id = 1
    and reviewer_id = 1234
    and date_review = mmddyyyy
    and review_rating = 4.5
    and review_content = "this is the content of the review"
     
  2. Andy.N

    Andy.N Well-Known Member

    I was able to come up with some way to insert old reviews into the table with minimal SQL query but I came across an issue of unique user_id.

    It appears that user_id is unique so that I can't import reviews into the table and assigned it to the same user (admin in this case) because they were submitted anonymously in the past.

    If I add a new review and change the user_id to 0, that review will disappear on the RM but the total count still have it.
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Anonymous reviews are not supported.

    You will have to use a unique user ID for each review.
     
    Andy.N likes this.
  4. Andy.N

    Andy.N Well-Known Member

    I'm afraid so.
    It was suggested to Mike before about the anonymous review and he seemed receptive. Let's hope we can see more flexibility in the next version.
     
  5. Andy.N

    Andy.N Well-Known Member

    I tried to work around this limit by editing the xf_resource_rating table directly and changing the resource_version_id to different number and so that I can use the same user_id but it failed as well.

    My reasoning is that I can leave multiple reviews for the same resource, one for each version. This works for download resource but I haven't found if it's the same for fileless resource.
     

Share This Page