2014-05-25, 04:09 PM
I have a problem with this one. It fetches user last threads but the problem is when I move user thread is shows second duplicated thread that has no views neither replies:
$query = $db->query("
SELECT t.*, t.subject AS threadsubject, u.username, u.displaygroup, p.displaystyle AS threadprefix,
t.dateline AS threaddate, t.lastpost AS threadlastpost
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)
LEFT JOIN ".TABLE_PREFIX."users u ON (t.lastposter=u.username)
WHERE t.visible = '1' And t.uid = '{$memprofile['uid']}'
GROUP BY t.tid
ORDER BY threadlastpost DESC
LIMIT 0, {$threadlimit}
");