Hi,
I have three tables as follows..
comments
topics
scores
each have a user_id and a user_points field. I want to take the values for user_points from comments and topics for all users, add these together and populate the scores table.
e.g user_id of 1 has 3 topics + 4 comments so my query should now populate scores as follows
user_id = 1
user_points = 7
etc..
Can this be done in a single query and if so how do I go about doing it?
Thanks in advance!!
M
Merging results
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia