Android sqlite query
2022/1/26 19:04:26
本文主要是介绍Android sqlite query,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
SQLiteDatabase db = dbhelper.getWritableDatabase(); String table = Player.TABLE_NAME ; String[] columns = new String[] { Player.KEY_USER_PASS }; String selection = Player.KEY_USER_NAME+"=?" ; String[] selectionArgs = new String[]{username}; String groupBy = "" ; String having = "" ; String orderBy = "" ; Player player = new Player(); Cursor cursor = db.query(table,columns,selection,selectionArgs,groupBy,having,orderBy); player.setPlayer_id(cursor.getInt(cursor.getColumnIndex(Player.KEY_ID))); player.setUser_name(cursor.getString(cursor.getColumnIndex(Player.KEY_USER_NAME))); player.setUser_pass(cursor.getString(cursor.getColumnIndex(Player.KEY_USER_PASS))); return player;
这篇关于Android sqlite query的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-01-18android.permission.read_media_video
- 2024-01-18android_getaddrinfo failed eai_nodata
- 2024-01-18androidmo
- 2024-01-15Android下三种离屏渲染技术
- 2024-01-09Android 蓝牙使用
- 2024-01-06Android对接华为AI - 文本识别
- 2023-11-15代码安全之代码混淆及加固(Android)
- 2023-11-10简述Android语音播报TTS
- 2023-11-06Android WiFi工具类
- 2023-07-22Android开发未来的出路