I make a query to find the last 24 results from three different tables.
The query is :
SELECT m.MovID,m.Type,m.Image,m.Date,t.SerID,t.Type,t.Image,t.Date,g.GamID,g.Type,g.Image,g.Date
FROM movie m, tvseries t, games g
GROUP BY m.MovID, t.SerID, g.GamID
LIMIT 0,24
but in the result of this query group by is not working.
The
GROUP BYis not the problem (at least not the major one).Th real problem is that you selecting data from 3 tables without joining them. This part of your query:
meanss all combinations of every row of the 1st table with every row of the 2nd with every row of the 3rd table. Is that what you want?
Most probably you want to
JOINthe 3 tables: