Page 1 of 1

Error in SQL syntax

Posted: Mon Sep 26, 2022 2:39 am
by ghasembaghi

https://demo.hkvstore.com/carslist

form data:
csrf_name: csrf63309f82c30e5
csrf_value: 36049ecd113b37f3322041ed757ea36e
t: cars
action: search
rules: {"condition":"AND","rules":[{"id":"Price","field":"Price","type":"double","operator":"between","value":[null,null],"data":{"format":""}},{"id":"Model","field":"Model","type":"string","operator":"is_null","value":null,"data":{"format":""}},{"condition":"AND","rules":[{"id":"Cylinders","field":"Cylinders","type":"integer","operator":"less_or_equal","value":5,"data":{"format":""}},{"condition":"AND","rules":[{"id":"Doors","field":"Doors","type":"integer","operator":"equal","value":56,"data":{"format":""}},{"condition":"AND","rules":[{"id":"Torque","field":"Torque","type":"string","operator":"ends_with","value":"5t","data":{"format":""}}],"not":false}],"not":false},{"condition":"AND","rules":[{"id":"HP","field":"HP","type":"string","operator":"is_not_empty","value":null,"data":{"format":""}}],"not":false}],"not":false},{"condition":"AND","rules":[{"id":"Price","field":"Price","type":"double","operator":"less","value":7,"data":{"format":""}}],"not":false}],"not":false,"valid":true}
cars_query_builder_group_0_cond: AND
cars_query_builder_group_1_cond: AND
cars_query_builder_group_3_cond: AND

error:
/etc/demo2023/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php(86): An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 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 ( Price < 7 )' at line 1


Re: Error in SQL syntax

Posted: Tue Sep 27, 2022 9:40 am
by Webmaster

Problem with is_null/is_empty operator for query builder and is fixed with the latest template (Tools -> Update Template to update). Demo site is also updated.