※ 引述《pakker (找尋蔚藍天空)》之銘言:
: select * from (
: (select * from board1 order by posttime limit 5) union
: (select * from board2 order by posttime limit 5) union
: (select * from board3 order by posttime limit 5) union
: (select * from board4 order by posttime limit 5) union
: (select * from board5 order by posttime limit 5) union
: ) AS U order by posttime limit 5;
: 這樣?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.36.135.64
抄的...XD
select * from (
(select * from boards
where board_name = '1'
order by posttime limit 5) union
(select * from boards
where board_name = '2'
order by posttime limit 5) union
(select * from boards
where board_name = '3'
order by posttime limit 5) union
(select * from boards
where board_name = '4'
order by posttime limit 5) union
(select * from boards
where board_name = '5'
order by posttime limit 5))
order by posttime limit 5;
這樣?