I'm using the Laravel framework to create an application, and have a database question.
I have a table called
posts. I have been pulling the 10 most recent rows from here and making use of an offset variable for pagaination.
Now however I also have a table
media that has a completely different table structure. What I want to be able to do it to pull the 10 most recent posts and media rows (10 in total, not 10 of each).
I can't merge two
LIMIT 5 queries together, because it is possible that the first media row is older than the 6th posts row, and in that case it should take precedence and there would only be 4 items from the media table.
Does anyone know of anything I can try here>