I have a table in my database, simply called level, with 2 fields per row,
lvl(primary key, auto_increment), and min_xp. This is for a game that I've
been working on, and I was wondering how I would go about accessing this
table from my User model, where I would be placing the add_xp and
check_level functions. The purpose being that when a user gains exp, it's
A)added to their exp field in the associated Profile table, and B)the level
table is queried, and if they meet the minimum exp requirement for the next
level up, the level field in their profile is also updated....


The alternative way of doing this would be to query the level table for a
certain amount of experience when viewing a user's profile, but I have a
feeling that this would cause issues in the long run as the number of users
increased......


Does anyone have any ides as to how to do this?

-- 
In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to