- Impact
- 18
I have this code at the moment:
but it isn't acctually counting the points. count_points to acctually be a tally of the amount of points each unique user_id has. Everytime a user earns points it is stored into the database, so it needs to add the value of every "point" field for that specific user!
Any help would be most appreciated.
Thanks
Tom
PHP:
$sql = "SELECT user_id, count(points) AS count_points FROM trans WHERE type_id!='30' AND type_id!='40' GROUP BY user_id ORDER BY count_points DESC LIMIT 100";
but it isn't acctually counting the points. count_points to acctually be a tally of the amount of points each unique user_id has. Everytime a user earns points it is stored into the database, so it needs to add the value of every "point" field for that specific user!
Any help would be most appreciated.
Thanks
Tom







