日期:2014-05-17 浏览次数:20691 次
-->try
select c.*,a.title,a.time,b.* from messagelist a,huifbiao b,usermessage c
where a.id=b.id and a.username=c.username
select a.*,b.touxiang
from huifbiao a inner join usermessage b on a.id=b.id and a.username=b.username
left join messagelist c on a.huifuid=c.id
where c.id is not null
select a.*,b.touxiang
from huifbiao a
left join usermessage b on a.id=b.id and a.username=b.username--也改成left join 试试
left join messagelist c on a.huifuid=c.id
where c.id is not null
select a.*,b.touxiang
from huifbiao a
left join usermessage b on a.id=b.id and a.username=b.username--换成left join 试试
left join messagelist c on a.huifuid=c.id
where c.id is not null
select a.*,b.touxiang
from huifbiao a inner join usermessage b on a.id=b.id and a.username=b.username
left join (select id,title,username,min(time)time
from messagelist
group by id,title,username) c on a.huifuid=c.id
where c.id is not null