I’ve got this table:

I want to choose the last two entries (the two with the largest id’s) no matter what,
and also the 4 entries that have the most ‘power’ both queries joined together.
So in this example I would only have 4 results, id 9 & 8, 3 & 4.
I tried:
$query = "SELECT * FROM table
ORDER BY power DESC LIMIT 4
INNER JOIN SELECT * FROM table
ORDER BY id DESC LIMIT 2 ";
I’m getting the “Invalid query” error. What is wrong here?
1 Answer