Error in executing ( select max(ord_id) as ord_id from order_form_detail where user_id = and status in ('step2','step3' )) with ([1064] - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and status in ('step2','step3' )' at line 4)