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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -