SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid
, NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
FROM thread AS thread
LEFT JOIN user AS user ON (user.username = thread.lastposter)
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE thread.forumid NOT IN (13)
ORDER BY thread.lastpost DESC LIMIT 0, 5
mysql error: Column 'views' in field list is ambiguous
mysql error number: 1052
what happened? at vb 3.0.7
|