2013-05-06 126 views
0

我想聯盟2代表具有相同的字段(具有相同的VARCHAR大小/ INT大小等)MySQL的聯盟返回BLOB

但在瀏覽器中,我得到的斑點......

select * from 
(
select * from (
SELECT media.id,ifnull(wasRead,0) as wasRead 
,teamid,newsDate,itemid 
,var1,var2,var3,var4,title,content 
,ifnull(optionSel,0) as optionSel,0 as itemType 
FROM media 
left join mediaList on mediaList.id = media.itemId 
where teamid = '1') as media 

union all 

select * from (
select managerNews.id,ifnull(wasRead,0) as wasRead 
,teamid,newsDate,itemid 
,var1,var2,var3,var4,title,content 
,ifnull(optionSel,0) as optionSel,0 as itemType 
from managerNews 
left join managerNewsList on managerNewsList.id = managerNews.itemId 
where teamid = 1) as managerNews 
) as merged 

order by newsDate desc 
limit 50 

我只是不知道該怎麼做。

在此先感謝。

+0

你可以發佈你所得到的? – SOfanatic 2013-05-06 15:41:08

+1

「瀏覽器中」是什麼意思?你在使用phpmyadmin嗎? – Barmar 2013-05-06 15:43:46

+0

而不是「播放器:36」我得到706C617965723A3136 – 2013-05-06 15:44:25

回答

0

那麼,在該行有不同的排序規則。太奇怪了,我錯誤地看到了,但終於解決了。

感謝:-)