I have a list of users and a list of sales,
(tables USERS, SALES)
$SQL = "SELECT * from USERS";
$result = @( $SQL ); while( $row = @mysql_fetch_array( $result ) ) {
}
Inside of the SALES table, I have a PRICE field, which has a number value, IE 10.00
The SALES table also has a USERID field that correspond to the USER table ID field
I want to be able to add up all of the records in the SALES table that belong to the users ID and organize that by greatest to least...
hope that makes sense, thanks!