I've created a method where the app checks if a number exists in the DB:
    Cursor player = playerDatabase.rawQuery("select * from playerTable where playerNumber ="+number,null);
  try {
      if (player.getCount() >= 0) {
          player.close();
          return true;
      }
      else{
          return false;
      }
  }finally {
      if(player != null){
          player.close();
      }
  }
But the problem is, this always returns true? The reason I am using it this way, is from the previous answers on Stack Overflow. What is the optimal way of being able to check if a search query returns a row/check if this number exits?
limit 1to your query. That way the engine will be able to drop out after the first (potentially only possible) hit rather then iterating over all entries. This might be non-relevant if the column is set to be unique, but you never know. :)if (player.getCount() >= 0)toif (player.getCount() >0)