try {
String sqlsting = "SELECT * FROM items WHERE name = ?";
Cursor cursor = database.rawQuery(sqlstring,null);
SQLiteStatement statement = database.compileStatement(sqlstring);
statement.bindString(1,itemname);
statement.execute();
int nameIx = cursor.getColumnIndex("name");
int priceIx = cursor.getColumnIndex("price");
int itemnumberIx = cursor.getColumnIndex("itemnumber");
namedetail = cursor.getString(nameIx);
itemnumber = cursor.getInt(itemnumberIx);
pricedetail=cursor.getDouble(priceIx);
cursor.close();
System.out.println("cursor çalıştı");
String price = pricedetail.toString();
nametext.setText(namedetail);
pricetext.setText(price);
itemnumbertext.setText(itemnumber);
}catch (Exception e ){
e.printStackTrace();
}