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

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -