select u.uname as talk_uname,
u.handle_name as talk_handle_name,
u.sex as talk_sex,u.role as talk_role,
i.color as talk_color,u.icon_no as iconno,
ta.sentence as sentence,ta.time as ttime,
ta.font_type as font_type,
ta.location as location,tr.icon as tcolor,u.trip
from (user_entry u,talk_old ta,user_icon i)
inner join (select tid from talk_old where room_no = '28744' order by tid DESC) as t on ta.tid=t.tid
left join user_trip tr on u.trip = tr.trip
where ta.date = and ((ta.heaven = '1') or (ta.uname = 'system'))
and ta.date =
and ((u.room_no = '28744' and u.uname = ta.uname and u.icon_no = i.icon_no)
or (u.uid = 1 and ta.uname = 'system' and u.icon_no = i.icon_no))
order by ta.tid DESC