Hello. There are 3 tables in the database.
MODELS `MOD_ID` int(11) NOT NULL,`MOD_MFA_ID` smallint(6) ,`MOD_CDS_ID` int(11) DESIG `CDS_ID` int(11) NOT NULL, `CDS_TEX_ID` int(11) NOT NULL TEXT `TEX_ID` int(11) NOT NULL,`TEX_TEXT` varchar(1200) How can I get the TEX_TEXT parameter TEX_TEXT from the third table (TEXTS), if the relationship is: MODELS parameter MOD_CDS_ID => parameter from the DESIG table CDS_ID And the parameter from the DESIG table CDS_TEX_ID = parameter from the third TEXTS table TEX_ID
That is, you need to get the following data: From the MODELS => MOD_CDS_ID
From DESIG table => CDS_ID = MOD_CDS_ID , CDS_TEX_ID
From table TEXTS => TEX_ID = CDS_TEX_ID , TEX_TEXT
Trying to do this:
select * from TOF_MODELS JOIN TOF_COUNTRY_DESIGNATIONS ON TOF_MODELS.MOD_CDS_ID = TOF_COUNTRY_DESIGNATIONS.CDS_ID JOIN TOF_DES_TEXTS ON TOF_COUNTRY_DESIGNATIONS.CDS_TEX_ID = TOF_DES_TEXTS.TEX_ID WHERE TOF_MODELS.MOD_MFA_ID = 647 Displays 0 lines