multiple or divide given points of all users


  • Default avatar
    meusam66    
     6 months ago  last edited 6 months ago
    0

    hello, can you explain me how to divide or multiple points of all users to 10 at once, for example?
  • Your avatar
    seyi    
     6 months ago
    0

    Hello,

    I am not sure I understand.  Are you saying you want to add 10 points to every user's aworeward account?
  • Default avatar
    meusam66    
     6 months ago
    0

    something like that, but not exactly, i am saying for example user1 has 1000, user2 325, user3 12 points, now i want to divide all the given user points to 10, so user1 would have 100, user2 32.5, user3 1.2 points, how can i do that in aworeward points system?
  • Default avatar
    support    
     6 months ago  last edited 6 months ago
    0

    The points are calculated based on the credits received.  So to affect all points you would have to modify the database directly.


    UPDATE #__aworewards SET  points = points / 10
     WHERE credit_type = "points" AND points IS NOT NULL AND points > 0
       AND ( points_paid = 0 OR points_paid IS NULL );

    Where #__ is changed to your database prefix.  Note it will only affect points where no payment has been made.

    Please BACKUP the #__aworewards table before running this query, so you can always revert back if you see an issue.