Mistři v programování na #hovnokod

SQL #1088

Jazykové mutace snadno a rychle :-)

SELECT *,el.show,
                ...
                IF(el.show=1, el.event_title, events.event_title) as event_title, 
                IF(el.show=1, el.event_description, events.event_description) as event_description,
                IF(el.show=1, el.text, events.text) as text,
                IF(el.show=1, el.refer, events.refer) as refer,
                IF(el.show=1, el.attending, events.attending) as attending,
                IF(el.show=1, el.contact, events.contact) as contact,
                IF(el.show=1, el.address, events.address) as address,
                IF(el.show=1, el.phone_no, events.phone_no) as phone_no,
                IF(el.show=1, el.event_title_web, events.event_title_web) as event_title_web,
                IF(el.show=1, el.event_title_bookmark, events.event_title_bookmark) as event_title_bookmark
               FROM events 
               LEFT JOIN events_lang el ON el.eventid = events.id AND el.lang='sk'
               ...

Anonymous,