Select recent threads based on board's view access [SOLVED]
Posted: Wed Jul 08, 2009 11:53 am
So I'm trying to create a list of recent threads based on date, the the thread's board's view access level. I have this query:
However, the id column from the r_forum_boards is overwriting the id from r_forum_threads(I assume because both columns have the same name.) The only thing I want from r_forum_boards is the access_view column.
SOLVED
I changed the select to: SELECT r_forum_threads.*
Code: Select all
SELECT *
FROM r_forum_threads
JOIN r_forum_boards ON r_forum_threads.board = r_forum_boards.id
WHERE r_forum_boards.access_view <= $view_level
ORDER BY date DESC
LIMIT $countSOLVED
I changed the select to: SELECT r_forum_threads.*