title: MYSQL error and join statements
body: <p>I'm using the following MYSQL statement but im getting the error: 'ErrorUnknown column 'property.id' in 'on clause'</p>
  
  <p>i've searched around and I think it's something to do with the JOIN and Mysql 5? this makes sense as the code used to work so a mysql update might have broken it</p>
  
  <p>How can i change my statement to stop the error happening?</p>
  
  <pre><code>SELECT property.id, 
         Concat(IF (name = '', '', Concat(name, '&lt;br /&gt;')), 
         IF (address = '', '', Concat(address, '&lt;br /&gt;')), IF (city = '', '', 
                                                           Concat(city, '&lt;br /&gt;')) 
         , IF ( 
         postcode = '', '', Concat(postcode, ', ')), property_region.region) AS 
         name, 
         property_type.type, 
         short_description, 
         property_tenure.tenure, 
         Format(sell_price, 0)                                               AS 
         sell_price, 
         Format(rent_price, 0)                                               AS 
         rent_price, 
         area, 
         CASE property.tenure 
           WHEN 1 THEN '' 
           WHEN 2 THEN 'display:none' 
           WHEN 3 THEN '' 
         end                                                                 AS 
         sell_display, 
         CASE property.tenure 
           WHEN 1 THEN 'display:none' 
           WHEN 2 THEN '' 
           WHEN 3 THEN '' 
         end                                                                 AS 
         rent_display, 
         IF (thumb_image_name = '', 'no_image.gif', thumb_image_name)        AS 
         thumb_image_name, 
         IF (bookmarks.property_id, 'checked=\"checked\"', '')               AS 
         bookmark_checked 
  FROM   property, 
         property_tenure, 
         property_region, 
         property_type 
         LEFT JOIN bookmarks 
                ON property.id = bookmarks.property_id 
                   AND bookmarks.user_id = $user_id 
  WHERE  property.featured = 1 
         AND property.active = 1 
         AND property.region = property_region.id 
         AND property.tenure = property_tenure.id 
         AND property.type = property_type.id 
  ORDER  BY timestamp 
  </code></pre>