I have a MySQL database with two tables (USER and SCORE). Is it possible to update the USER table (i.e. calculate the average scores from the SCORE table for all users in table USER) in one MySQL query or do I have to run a PHP loop?
USER
username average_score
john 50
fred 100
SCORE
username score
john 100
john 25
john 25
fred 50
fred 150


Reply With Quote







Bookmarks