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

Correct way to find model results with bcmath numbers

I have 2 variables, a min and max that have been calculated using the bcmath functions (Integers greater than PHP_MAX_INT).

BCMath turns these into strings therefore the below isn't working:

$model = Model::findFirst(array(
    'conditions'    => 'min < ?0 AND max > ?1',
    'bind'  => array($var->min, $var->max)
));

ANy ideas?



13.4k
Accepted
answer

Nevermind... It does work.