I have two tables one for topics and one for users.. I want to select all the topics from the topics table and display the user's name not their ID, I wrote out the following SQL but it's displaying each topic for each user in the user's table
SELECT forum_titles.topic_id, forum_titles.author_id, forum_titles.title,
DATE_FORMAT(forum_titles.time_last, '%l:%i%p %b %d') as timelast,
forum_titles.allowed, forum_titles.type, user_account.id, user_account.name
FROM user_account, forum_titles
WHERE allowed IS null OR allowed = \"$user\" AND forum_titles.author_id = user_account.id
ORDER BY timelast DESC LIMIT $s, $e;
any suggestions. thanks 🙂