Really confused on how to do this that it doesn't kill the database so I figured I'd ask you guys here.
I need to run a while statement unless there is a better function to use, that selects data from two different tables. Below is the table name and column information for each
compbattle
id, userid, compid, date, winner, money
match
id, user, vs, date, wl, money
I want to display both data in a table and base it on sorting so that they are mixed by the date in descending order. The query run checks to see there is a match.user = $user[id] from the one table and combines it to see if there is a userid=$user[id] from the second. Is there anyway with one mysql query that I can check both tables, sort by the date and then use the limit part. Sometimes it'll be possible that all data will be selected from compbattle and other times it could be 20 some selected from compbattle and only 13 matches from the match table as long as its sorted properly in descending order, I really don't care.