select bio.*, sp_image.*, office.name, office.address1, office.address2, office.country, office.city, office.state, office.zip, if (bioposition.deactivated, '', bioposition.title) as title from .bio left outer join .sp_image on (bio.bio_id = sp_image.item_id and sp_image.table_tag = 'bio' and sp_image.field_tag = 'photo') left join .bioposition on bio.positionid = bioposition.bioposition_id left outer join .office on bio.officeid = office.office_id where bio.bio_id =
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 11