php - Adding points for each user -


I want to add points for each user identified with a mail address, whenever he performs a task, Points are added, different points for different tasks and every point needs to be done every day, this is what I am trying to do and another thing I am working on the jnd.

  public function sumpoint ($ user_email) {('' (dot ''))) - & gt; Select where ('emailAddress =?', $ User_email) = $ this- & gt; GetAdapter () - & gt; Selection () - & gt; ('Tbl_points' - & gt; order ('on created DESC'); $ Totalpoints = $ this-> getAdapter () -> Fitchon ($ selection);}   

I'm not sure if this is correct, please let me know.

How do you manage this Do not use a scene in your database?

Something like this:

  as V_USERS (select one. *, (Select number ( Points) from tbl_points where tbl_points.emailAdress = a.emailAdress) sum_points your_user_table A);   

And then, in the order, you can call 'V_USERS'. If you set the authentication table, so that the number of points will always be right, and it would avoid the process you.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -