SELECT m.sgr_department_code , IF(m.sgr_machine_short_desc <> '', m.sgr_machine_short_desc,m.sgr_machine_short_desc) , m.sgr_machine_type_code -- , m.marketing_description , mt.sgr_machine_type_desc_en as sgr_machine_type_desc , m.sgr_machine_brand , trim(concat(m.sgr_machine_model,' ',sgr_machine_submodel)) as sgr_machine_model , m.sgr_machine_year , m.sgr_machine_ID , m.marketing_status as status , u.url_name_en as url_name , mt.Miscellaneous , (select url_image from TMBR_WEB_URLS where url_action = 'SEARCH' and url_name like 'BD-%' and url_brand = m.sgr_machine_brand order by url_count desc limit 1) url_image , (UPPER( concat_ws(' ',m.sgr_machine_ID,UPPER(m.sgr_machine_short_desc), UPPER(mt.sgr_machine_type_desc_en), UPPER(m.sgr_machine_brand),UPPER(m.sgr_machine_model),UPPER(m.sgr_machine_submodel), UPPER(m.marketing_description),m.sgr_machine_year) ) ) as concatenacion FROM TMBR_WEB_MACHINES as m , TMBR_WEB_MACHINE_TYPES mt , TMBR_WEB_DEPARTMENTS d , TMBR_WEB_URLS u WHERE d.sgr_department_code = m.sgr_department_code and mt.sgr_machine_type = m.sgr_machine_type_code and u.url_name Like 'R-%' and u.url_action = 'SPEC' and u.url_dept = m.sgr_department_code and u.url_m_type = m.sgr_machine_type_code and u.url_ref = m.sgr_machine_ID -- AND m.sgr_department_code = 'TP' -- AND m.sgr_machine_type_code = 'TPSE' AND m.web_published = '1' AND cast(UPPER(concat_ws(',', CAST(lpad(sgr_machine_ID,5,'0') as char), upper(m.sgr_machine_brand), upper(m.sgr_machine_model), upper(m.sgr_machine_submodel), upper(m.marketing_description), upper(m.sgr_machine_short_desc), upper(mt.sgr_machine_type_desc_EN), upper(mt.sgr_machine_type_desc_ES), upper(mt.sgr_machine_type_desc_FR), upper(mt.sgr_machine_type_desc_IT), upper(mt.sgr_machine_type_desc_DE), upper(mt.sgr_machine_type_desc_RU), upper(mt.sgr_machine_type_desc_PL), upper(mt.sgr_machine_type_desc_PT), upper(mt.sgr_machine_type_desc_TR), upper(mt.sgr_machine_type_desc_ZH), upper(d.sgr_department_short_desc_EN), upper(d.sgr_department_short_desc_ES), upper(d.sgr_department_short_desc_FR), upper(d.sgr_department_short_desc_IT), upper(d.sgr_department_short_desc_DE), upper(d.sgr_department_short_desc_RU), upper(d.sgr_department_short_desc_PL), upper(d.sgr_department_short_desc_PT), upper(d.sgr_department_short_desc_TR), upper(d.sgr_department_short_desc_ZH), upper(m.sgr_machine_short_desc_ES), upper(m.sgr_machine_short_desc_FR), upper(m.sgr_machine_short_desc_IT), upper(m.sgr_machine_short_desc_DE), upper(m.sgr_machine_short_desc_RU), upper(m.sgr_machine_short_desc_PL), upper(m.sgr_machine_short_desc_PT), upper(m.sgr_machine_short_desc_TR), upper(m.sgr_machine_short_desc_ZH), upper(m.marketing_description_ES), upper(m.marketing_description_FR), upper(m.marketing_description_IT), upper(m.marketing_description_DE), upper(m.marketing_description_RU), upper(m.marketing_description_PL), upper(m.marketing_description_PT), upper(m.marketing_description_TR), upper(m.marketing_description_ZH), m.sgr_machine_year)) as CHAR CHARACTER SET utf8) like CONCAT('%',ucase(?),'%') ORDER BY concat(m.sgr_machine_brand,m.sgr_machine_model,sgr_machine_submodel) ASC , sgr_machine_ID DESC LIMIT , 18Error en la insercion.Data too long for column 'visit_type' at row 1Excepción capturada call_user_func_array bind_param