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.

daniel,
you're missing a on in the INNER JOIN subjects topics.subject_id=subjects.id
should be INNER JOIN subjects on topics.subject_id=subjects.id

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.