title: Can't verify user login details in Android SQLite
body: <p>Here is the code I used to check if a user is already the part of database or not:</p>
  
  <pre><code>  Boolean checkEmailPass = db.emailpasswd(email, pass);
              if (checkEmailPass== false){
                  Toast.makeText(getApplicationContext(),"Email or password incorrect", Toast
                          .LENGTH_SHORT).show();
              }else{
                  Intent i = new Intent(LoginActivity.this, HomeActivity.class);
                  startActivity(i);
                  finish();
  
                  Toast.makeText(getApplicationContext(),"Successful Login",Toast.LENGTH_SHORT).show();
              }
  </code></pre>
  
  <p>Below is the code part from <code>datahelper</code> class. The name of the table is <code>user</code>.</p>
  
  <pre><code> public boolean emailpasswd(String email, String password){
      SQLiteDatabase db = this.getReadableDatabase();
      Cursor cursor = db.rawQuery("Select * from user where email=? and password = ?", new
              String[]{email, password});
      if (cursor.getCount()&gt;0){
          return false;
      }else {
          return true;
      }
    }
  }
  </code></pre>
  
  <p>I have created an application with the help of a SQLite database. The whole application is working fine, but just whenever I am trying to log in, the application is not able to check email and password from the database and that's why no matter what I enter I get the toast of successful login. Please check the code and guide me through.</p>