Answer the question
In order to leave comments, you need to log in
How to make a SQL select query in JAVA?
I make a request for a selection, the result comes out only when I look for the first element of the database. In other cases, there is no result.
c = database.rawQuery("SELECT width750to1000 FROM depth WHERE _id = 4",null);
if (c!=null && c.moveToFirst() ){
String str;
do{
str = c.getString(c.getColumnIndexOrThrow("width750to1000"));
textView.setText(str);
}
while (c.moveToNext());
}
c.close();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question