cakephp - How can I fetch rows using numeric values as condition? -
There is a colum alphanumeric values in my database table. I want to get only rows of numeric values in this column.
$ this-> Mymodel- & gt; Find ('all', 'position' => array ('mymodel .field') => gt; ???));
If you are using MySQL, you can use it.
$ this-> Mymodel- & gt; Search ('all', 'conditions' => (array' Mymodel.field REGEXP '^ [0-9] + $ "'));
Comments
Post a Comment