Invalid query: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 F17kakaku >= AND F17kakaku <= AND F18menseki >= AND F18menseki <= AND F0' at line 1 Whole query: SELECT * FROM macj_data WHERE F01siyubetu = AND F17kakaku >= AND F17kakaku <= AND F18menseki >= AND F18menseki <= AND F04ensenCODE = '' order by F44ekikakaku