Home Unknown column in 'on clause' error
Reply: 0

Unknown column in 'on clause' error

user696
1#
user696 Published in April 24, 2018, 8:20 am

So I'm trying to query three tables and can do two of three but not the third, I've tried several ways and keep getting this error:

#1054 - Unknown column 'thirdDATA.creator_id' in 'on clause'

This works:

SELECT * 
FROM `mainDATA` 
LEFT JOIN altDATA ON creator_id =  altDATA.creator_id

This works:

SELECT * 
FROM `mainDATA` 
LEFT JOIN thirdDATA ON creator_id =  thirdDATA.creator_id
LIMIT 0 , 30

This gets an error:

SELECT * 
FROM `mainDATA` 
LEFT JOIN altDATA ON creator_id =  altDATA.creator_id
JOIN thirdDATA ON creator_id =  thirdDATA.creator_id
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310252 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO