mysql Inner join problem

I have written a mysql query-
SELECT questions.id,questions.date,questions.title,users.user_name,subjects.subject FROM questions INNER JOIN topics ON questions.topic_id=topics.id INNER JOIN subjects topics.subject_id=subjects.id INNER JOIN users ON subjects.id=users.sub1 OR subjects.id=users.sub2 WHERE users.id=8;
which is giving error-
1066 - Not unique table/alias: 'topics' .i am unable to understand the problem.

You are missing ON keyword after inner join subjects

SELECT questions.id,questions.date,questions.title,users.user_name,subjects.subject FROM questions INNER JOIN topics ON questions.topic_id=topics.id INNER JOIN subjects ON topics.subject_id=subjects.id INNER JOIN users ON subjects.id=users.sub1 OR subjects.id=users.sub2 WHERE users.id=8;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.