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 condos.visible = 'y' AND active='y'' at line 1select slug,street_no,street_dir,street_name,street_type from bccondos.condos where condos.id = AND condos.visible = 'y' AND active='y'