Error in query - 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 'as head_lang, tv3.value_en/_data as 'title', tv3.data_lang_en/ as title_lang, ' at line 5
SQL:
select p.*,
rt1.name as page_0,
rt1.filename as page_1,
tv2.value_en/_data as 'head',
tv2.data_lang_en/ as head_lang,
tv3.value_en/_data as 'title',
tv3.data_lang_en/ as title_lang,
tv4.value_en/_data as 'subtitle',
tv4.data_lang_en/ as subtitle_lang,
tv5.value_en/_data as 'subtitle2',
tv5.data_lang_en/ as subtitle2_lang,
tv6.value_en/_data as 'subtitle3',
tv6.data_lang_en/ as subtitle3_lang,
tv7.value_en/_data as 'bodyhtml',
tv7.data_lang_en/ as bodyhtml_lang,
tv8.value_en/_data as 'body',
tv8.data_lang_en/ as body_lang
FROM pageitems p
LEFT OUTER JOIN public_pages rt1 on rt1.id = p.page_id
LEFT OUTER JOIN object_textvalues_col tv2 on tv2.text_id = p.head_txtid
LEFT OUTER JOIN object_textvalues_col tv3 on tv3.text_id = p.title_txtid
LEFT OUTER JOIN object_textvalues_col tv4 on tv4.text_id = p.subtitle_txtid
LEFT OUTER JOIN object_textvalues_col tv5 on tv5.text_id = p.subtitle2_txtid
LEFT OUTER JOIN object_textvalues_col tv6 on tv6.text_id = p.subtitle3_txtid
LEFT OUTER JOIN object_textvalues_col tv7 on tv7.text_id = p.bodyhtml_txtid
LEFT OUTER JOIN object_textvalues_col tv8 on tv8.text_id = p.body_txtid
where showdate <= '2014-07-26 03:14:59' and expiredate > '2014-07-26 03:14:59' ORDER BY sort_order