Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Find where field is not null in cakephp

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 5.39k
    Comment on it

    Hello Readers! if you have a database table "users" which has a field "email". And you are looking for a query that fetch out every email field only which are not null in cakephp

    Here is the following code below you can use, and its working fine

    $this->User->find('all', array('conditions' => array('User.email !=' => null));
    

    by writing the 'Users.email !=' it will only pop-up the result which have some values.

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: