I have a game achievement system on my site. The goal is to have multiple achievements available for the user to achieve. In order to check if the user has completed an achievement, i need some kind of check whether a variable has reached a certain level(e.g. amount of games played >= 5).
I have a field in the database, "complete_code", which contains a code that returns true when the achievement was completed(e.g. 5 games played) and false otherwise. I execute this code with the php eval function.
Is it common practice to save code in a database, or is this a no go?