SQLクエリー実行時にエラーが発生しました。

SELECT * FROM tbl_photo where open_flg=1 and eid= 43?d=311 and pid< order by pid DESC

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 '?d=311 and pid< order by pid DESC' at line 1