Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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 PHPMAXINT).

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?


Nevermind... It does work.