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 'OR friends.friend_id_2 = ) AND friends.friend_status = 3' at line 9
SELECT DISTINCT u.user_name as friend_name, u.id as friend_id, u.user_type, u.street_address, u.zip, u.lat, u.lon, fa_user_profile.* FROM fa_user u INNER JOIN fa_user_profile ON (fa_user_profile.id = u.id) INNER JOIN friends ON ((u.id = friends.friend_id_1 OR u.id = friends.friend_id_2)) WHERE 0=0 AND ( u.user_type = 'farmer' ) AND (friends.friend_id_1 = OR friends.friend_id_2 = ) AND friends.friend_status = 3