DB Error: syntax error

SELECT fil_url_portion, bou_external_product_id, bou_full_url FROM book_url, afiliation WHERE fil_id= AND bou_fil_id=fil_id AND bou_bok_id=5175 [nativecode=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 'AND bou_fil_id=fil_id AND bou_bok_id=517' at line 9]