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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -