A Database Error Occurred

Error Number: 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 '' at line 7

SELECT *, (SELECT IF( `property_ref` = `Refnumber` , 1, 0 ) FROM favourites WHERE property_ref = `Refnumber` AND user_id = '') AS 'is_fav' FROM properties WHERE Refnumber =