Cannot perform 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 'AND = '1' AND _tours.tour_id NOT IN (0) ORDER BY tour_i' at line 46 SELECT _tours.tour_id, _tours.distributor_id, _tours.member_id, _tours.title, _tours.address,, _tours.state_id, _tours.country_id, _tours.zip_code, _tours.property_sold, _tours.property_sold_date, _tours.price, _tours.property_type_id, _tours.property_style_id, _tours.bedrooms, _tours.baths,, _tours.mls_link, _tours.mls_description, _tours.submit_date,, _tours.expiration_date, _tours.update_time, _tours.test_mode,, _tours.music_id, '' AS type, syndication.color_id, syndication.sold_order, syndication.sold_display, syndication.active_order, syndication.display_type, member.share_type, distributor_profile.distributor_id AS affiliate_id, vt_property_type.property_type_name AS property_type_name, vt_property_style.property_style_name AS property_style_name, vt_property_style.property_style_sua AS property_style_sua FROM _tours LEFT JOIN vt_property_type ON _tours.property_type_id = vt_property_type.property_type_id LEFT JOIN vt_property_style ON _tours.property_style_id = vt_property_style.property_style_id LEFT JOIN distributor_profile ON _tours.distributor_id = distributor_profile.distributor_id LEFT JOIN syndication ON syndication.member_id = _tours.member_id AND syndication.has_affiliate = '0' LEFT JOIN member ON member.member_id = _tours.member_id WHERE AND = '1' AND _tours.tour_id NOT IN (0) ORDER BY tour_id DESC, submit_date DESC LIMIT 0,6