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 '' at line 1 Whole query: select * from mariagemealdata where openflg = 1 and deletecnt < 2 and userid = 'winebuff' and datanum = 165/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 '' at line 1 Whole query: select * from mariagemealdata where openflg = 1 and deletecnt < 2 and userid = 'winebuff' and datanum = 165/