Hello I am developing a levelsystem for a web application.
What i have:
Database:
table: levels -- fields: level_id, level_points
This table defines the levels from 0 to 20 with different point values.
table: profiles -- relevant fields: profile_id, profile_points, profile_level
In profile_points will the points of a user be saved. In profile_level should be the level the user has now, like the levels table says.
My Question:
Is there anyway to make an mysql function which automates this. What I mean is, that if i insert into profile_points that mysql database knews that there was a level up, and inserts automatically the new level into profile_level?
No solution: No solution for me is, to calculate the level always new for the web application'!
Thanks for your help!