its my code. What i doing wrong? I would like to display descending results in recyclerview.
TableInfo.TABLE_COLUMN_MESSAGE = "points"
override fun onBindViewHolder(p0: MojViewHolder, p1: Int) {
val wynikwynik = p0.view.textViewWynik
val wynikuser = p0.view.textView_user
val cursor = db.query(TableInfo.TABLE_NAME, null, BaseColumns._ID + "=?", arrayOf(p0.adapterPosition.plus(1).toString()), null, null, TableInfo.TABLE_COLUMN_MESSAGE +" DESC")
if (cursor.moveToFirst()){
wynikwynik.text=cursor.getString(1).toString()
wynikuser.text=cursor.getString(2).toString()
}
cursor.close()
}