title: how to check data from 2 database
body: <p>So im currently creating 2 database which is client and midwife. so at sign in page code, how should i modify the code so that i can check if the username and password inserted are from client or midwife ? thank you in advance. </p>
  
  <p>databasehelper = client // databasehelper1 = midwife</p>
  
  <p>here's my sign in code :</p>
  
  <pre><code>    _btnsignin.setOnClickListener(new View.OnClickListener()
      {
          @Override
          public void onClick(View v) {
  
              _username = (EditText) findViewById(R.id.editusername);
              _password = (EditText) findViewById(R.id.editpassword);
              String str1 = _username.getText().toString();
              String str2 = _password.getText().toString();
              cursor = db.rawQuery("SELECT * FROM " + DatabaseHelper.TABLE_NAME + " WHERE " + DatabaseHelper.COL_2 + "=? AND " + DatabaseHelper.COL_9 + "=?", new String[]{str1, str2});
              //cursor1 = db1.rawQuery("SELECT * FROM " + DatabaseHelper1.TABLE_NAME + " WHERE " + DatabaseHelper1.COL_2 + "=? AND " + DatabaseHelper1.COL_9 + "=?", new String[]{str1, str2});
              if (cursor != null)
              {
                  if (cursor.getCount() &gt; 0)
                  {
                      Intent gotowelcome = new Intent(SIGN_IN.this, WELCOME.class);
                      gotowelcome.putExtra("Username", str1);
                      SIGN_IN.this.startActivity(gotowelcome);
                  } else
                      {
                      Toast.makeText(getApplicationContext(), "ERROR", Toast.LENGTH_LONG).show();
                      }
              }
          }
      });
  </code></pre>