Darkness Soul Posted April 26, 2006 Share Posted April 26, 2006 Hi Guys,Well, mysql is not my speciality, so, what I'm done wrong?D.SoulError:[code]#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ONtbCatalogo_Produtos.id_subdepartamento = tbCatalogo_Subdepa [/code]Code:[code]SELECT tbCatalogo_Produtos.id AS id, tbCatalogo_Produtos.titulo AS tituloFROM tbCatalogo_Departamentos INNER JOIN ( tbCatalogo_Subdepartamentos INNER JOIN ( tbCatalogo_Produtos ON tbCatalogo_Produtos.id_subdepartamento = tbCatalogo_Subdepartamentos.id ) ON tbCatalogo_Subdepartamentos.id_departamento = tbCatalogo_Departamentos.id ) ON tbCatalogo_Departamentos.id = 2WHERE tbCatalogo_Subdepartamentos.id = 5[/code] Quote Link to comment https://forums.phpfreaks.com/topic/8486-inner-join/ Share on other sites More sharing options...
fenway Posted April 27, 2006 Share Posted April 27, 2006 This is probably a scoping issue.... what's with all the parentheses? Quote Link to comment https://forums.phpfreaks.com/topic/8486-inner-join/#findComment-31192 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.