We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

can not use NOT BETWEEN in find() and query() function

I have one problem when use NOT BETWEEN to query database. First case : I use query() function

$users = User::query()
    ->notBetweenWhere('id', 1, 3)
    >execute();

so, I get a message:

Syntax error, unexpected token BETWEEN, near to ' :ACP0: AND :ACP1:', when parsing: SELECT [Multiphalcon\Chapter07\Models\User].* FROM [Multiphalcon\Chapter07\Models\User] WHERE id NOT BETWEEN :ACP0: AND :ACP1: (126)

Second case : i use find() function

$users = User::find([
        'conditions'    =>  'id NOT BETWEEN 1 AND 3'
]);

So, I get the same message as first case.

please, fix this problem for me. thank you very much