SELECT t.dateline AS date,t.tid, t.subject, u.avatar,t.views, t.username, t.replies, u.profilepic, t.uid, p.thumbsup, t.firstpost, f.name, f.fid, p.message, a.updatetime, a.md5hash, a.uploadtime, a.aid, a.attachname, a.filename, a.thumbs, td.vidid, td.cat, td.portada
FROM ". TABLE_PREFIX ."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)
LEFT JOIN ".TABLE_PREFIX."xtattachments a ON (a.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."threadfields_data td ON (td.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=t.firstpost)
WHERE t.fid IN ($f4id) AND t.uid IN ($show_post_list)
UNION ALL
SELECT th.dateline AS date, th.thumbsup, th.uid
FROM ". TABLE_PREFIX ."thumbspostrating th
ORDER BY date DESC
LIMIT ".(($page-1)*$perpage).", ".$perpage);
Example:
- Thread number one dateline: today
- Like number one dateline: yesterday 1:10pm
- Thread number two dateline: yesterday 1:09pm
- Like number two dateline: yesterday 1:08pm
- Like number three dateline: yesterday 1:07pm
- Thread number three dateline: yesterday 1:05pm
I don’t know why this doesn’t work?
In ORDER BY <-- I need t.dateline and l.dateline in to one for do that example.
1222 - The used SELECT statements have a different number of columns
doesn't work?