SELECT p.*, p.id as propertyid, pl.propertylocation as location, pl.seo_name as location_url, pl.description as locationdesription, pt.propertytype_es as type_name, pt.seo_name as type_url, pt.propertytype_es as type_name_es FROM pm_properties p INNER JOIN pm_propertylocations pl on (p.propertylocation=pl.id) INNER JOIN pm_propertytypes pt on (p.propertytype=pt.id) WHERE p.id='38' AND p.propertyshow=1 LIMIT 1