Hi, dschissler.
Not sure I understood first part with enable_literals
.
That's totally not a problem for me to use parameters in queries that can be presented in PHQL(that's how I usually do), however documentation states enable_literals
affects only PHQL queries.
As I undersand from second part of your message, I can use raw sql for ftSearch with params, like:
$sql = 'SELECT field1, field2 FROM table WHERE MATCH (/*ft fields list*/) AGAINST(":param1: :param2:" IN BOOLEAN MODE)'
$params = [ 'param1'=>'firstValue','param2'=>'secondValue']
$result = new MyModel();
$results = new Resultset(null, $result, $result->getReadConnection()->query($sql,$params));
Is it possible to bind parameter types in this code? And if it's not possible, is this solution secure enough?