1

I'm writing a SQL script to modify userpoint totals. Best I can tell the module has three tables: userpoints, userpoints_total and userpoints_txn. userpoints_txn is straightforward enough, it's a record of the individual transactions.

Both userpoints and userpoints_total seem to be aggregate of points, however, I don't understand the difference; userpoints_total seems redundant.

userpoints_total schema is:

uid int(11) PK
points int(11)
max_points int(11)
last_update int(11)

while userpoints has two additional columns

pid int(11) AI PK
uid int(11)
points int(11)
max_points int(11)
last_update int(11)
tid int(11)

tid is 0 for all rows and pid is auto-increment primary key. does anyone know why the module maintains both tables? both have the same number of rows and consistent values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.