CrazyMerlin
07-10-2006, 11:55 AM
Hey guys,
I am being returned an error saying that 'user_idx' below is ambiguous.
SELECT vg_msgb_topics.topic_idx
FROM vg_msgb_categories
LEFT JOIN vg_msgb_forums
USING ( cat_idx )
LEFT JOIN vg_msgb_topics
USING ( forum_idx )
LEFT JOIN vg_msgb_topics_read
USING ( topic_idx )
LEFT JOIN vg_user_data
USING ( user_idx )
WHERE vg_user_data.user_idx = '1'
AND vg_msgb_forums.view_access <= '10000'
AND vg_msgb_topics_read.read_idx IS NULL
AND vg_msgb_topics.topic_idx IS NOT NULL
ORDER BY vg_msgb_topics.post_date DESC
LIMIT 0 , 20
Can anyone see and obvious fault here, and what exactly does it mean by ambiguous??
Thank you for any and all help.
CM
I am being returned an error saying that 'user_idx' below is ambiguous.
SELECT vg_msgb_topics.topic_idx
FROM vg_msgb_categories
LEFT JOIN vg_msgb_forums
USING ( cat_idx )
LEFT JOIN vg_msgb_topics
USING ( forum_idx )
LEFT JOIN vg_msgb_topics_read
USING ( topic_idx )
LEFT JOIN vg_user_data
USING ( user_idx )
WHERE vg_user_data.user_idx = '1'
AND vg_msgb_forums.view_access <= '10000'
AND vg_msgb_topics_read.read_idx IS NULL
AND vg_msgb_topics.topic_idx IS NOT NULL
ORDER BY vg_msgb_topics.post_date DESC
LIMIT 0 , 20
Can anyone see and obvious fault here, and what exactly does it mean by ambiguous??
Thank you for any and all help.
CM