I Have Been thinking of the way to do this for almost a week now.
Make three different queries and combine their data with UNION
and apply limit on UNION
and on individual queries as well. Please keep the order same in which you need the data. This should resolve your problem easily.
Here is example:
SELECT * FROM (
SELECT ... FROM ... WHERE ... LIMIT 10
UNION
SELECT ... FROM ... WHERE ... LIMIT 10
UNION
SELECT ... FROM ... WHERE ... LIMIT 10
) as something LIMIT 10;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.