Phalcon model FindFirst on NULL values

Hi all,

My question is here: StackOverflow.

Basically, this does not work:

$model = MyModel::findFirst([
    'conditions' => 'field=?0',
    'bind' => [
        0 => null,
    ],
    'bindTypes' => [
        0 => Phalcon\Db\Column::BIND_PARAM_NULL,
    ]
]);

What am I doing wrong there?

Cheers!



49.2k

Well, apart from doing 'conditions' => 'field IS NULL',

edited Aug '20

I've never done this sort of thing - but your second comment seems like it should work, no?

What does the query look like on the server's side?