DatabaseUtils.queryNumEntries (since api:11) is useful alternative that negates the need for raw SQL(yay!).
SQLiteDatabase db = getReadableDatabase();
DatabaseUtils.queryNumEntries(db, "users",
"uname=? AND pwd=?", new String[] {loginname,loginpass});
More Related Contents:
- How to add multiple edit text and spinner data into SQLite database?
- Why does the application crash when I press the button to insert the values in the table? [duplicate]
- Pros and Cons of SQLite and Shared Preferences [closed]
- Share SQLite database between 2 android apps?
- Location of sqlite database on the device
- Android column ‘_id’ does not exist?
- Android: upgrading DB version and adding new table
- Android P – ‘SQLite: No Such Table Error’ after copying database from assets
- How to ignore accent in SQLite query (Android)
- Deleting Row in SQLite in Android
- How to disable the Clear Data button in Application info of Manage application
- How to convert image file data in a byte array to a Bitmap?
- Why do I get a “sqlite3: not found” error on a rooted Nexus One when I try to open a database using the adb shell?
- Android sqlite how to check if a record exists
- Does Android Support JDBC
- How to perform an SQLite query within an Android application?
- How do I order my SQLITE database in descending order, for an android app?
- Android SQLite Database, WHY drop table and recreate on upgrade
- How can I insert image in a sqlite database
- Android ExpandableListView and SQLite Database
- Multiple Table SQLite DB Adapter(s) in Android?
- Is it possible to apply primary key on the text fields in android database
- How to get the number of unread gmail mails (on android)
- What is The use of moveToFirst () in SQLite Cursors
- sqlite example program in android [closed]
- Create SQLite database in android
- How to check database on not rooted android device
- Compare dates (stored as string) in android sqlite database?
- H2 Database vs SQLite on Android [closed]
- Backup Room database