MDB2 Error: no such field

_doQuery: [Error message: Could not execute statement]
[Last executed query: 
		SELECT p.photoID, p.copyright, p.date_photo, p.cotations_orig,  p.cotations, ca.cote_new,
		IF(ca.title_long_en = '', ca.title_long_fr, ca.title_long_en) as title,
		ca.countryIDs, candidature_type_en as candidature_type, i.inscription_en as inscription,
		CONCAT_WS('@::@',IF(LENGTH(p.photo_en) > 0, CONCAT(p.photo_en, ' (EN)'), NULL)
							,IF(LENGTH(p.photo_fr) > 0, CONCAT(p.photo_fr, ' (FR)'), NULL)
							,IF(LENGTH(p.photo_es) > 0, CONCAT(p.photo_es, ' (ES)'), NULL)
							,IF(LENGTH(p.photo_ru) > 0, CONCAT(p.photo_ru, ' (RU)'), NULL)
							,IF(LENGTH(p.photo_ar) > 0, CONCAT(p.photo_ar, ' (AR)'), NULL)
							,IF(LENGTH(p.photo_zh) > 0, CONCAT(p.photo_zh, ' (ZH)'), NULL)
					   ) AS labels,
		CONCAT_WS('@::@',IF(LENGTH(p.photo_ori_en) > 0, CONCAT(p.photo_ori_en, ' (EN - src)'), NULL)
							,IF(LENGTH(p.photo_ori_fr) > 0, CONCAT(p.photo_ori_fr, ' (FR - src)'), NULL)
							,IF(LENGTH(p.photo_ori_es) > 0, CONCAT(p.photo_ori_es, ' (ES - src)'), NULL)
							,IF(LENGTH(p.photo_ori_ru) > 0, CONCAT(p.photo_ori_ru, ' (RU - src)'), NULL)
							,IF(LENGTH(p.photo_ori_ar) > 0, CONCAT(p.photo_ori_ar, ' (AR - src)'), NULL)
							,IF(LENGTH(p.photo_ori_zh) > 0, CONCAT(p.photo_ori_zh, ' (ZH - src)'), NULL)
							,IF(LENGTH(p.photo_ori_other) > 0, CONCAT(p.photo_ori_other, ''), NULL)
					   ) AS labels_source,
		IF(mandatoryID = 1, 10, mandatoryID) as tri
		FROM candidature ca
		LEFT JOIN candidature_type ct ON (ct.candidature_typeID = ca.candidature_typeID)
		LEFT JOIN inscription i ON (i.inscriptionID = ca.inscriptionID)
		LEFT JOIN photo p ON (p.candidatureID = ca.candidatureID)
		WHERE ca.cote_new = 1852
		ORDER BY tri DESC, p.photoID
		LIMIT 20
	]
[Native code: 1054]
[Native message: Unknown column 'p.candidatureID' in 'on clause']

MDB2 Error: syntax error

_doQuery: [Error message: Could not execute statement]
[Last executed query: SELECT GROUP_CONCAT(country_en SEPARATOR ', ') FROM country WHERE countryID IN ()]
[Native code: 1064]
[Native message: 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 ')' at line 1]
Extracted from database on 2026-06-15 - Array ( ) , file no