A
A
Andrey Galushko2015-11-09 14:59:20
Java
Andrey Galushko, 2015-11-09 14:59:20

ListView getting record ID from database on click?

I fill the ListView with data parsed from JSON, there is such a parameter as the date, the author, well, what I need is the ID number from the Mysql database, here's how to get this number when clicking on the ListView, it gives me, for example, ID=5, although it goes in the database under the number ID=93 how to solve this issue, can someone come across this? I just already went through a lot of forums, basically everything was collected to the heap and it's really not clear how all this can be made to work, at least a working example or a link to a working example. Already tired for a week, my head is like a vegetable, thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2015-11-09
@gadfi

with a high probability I can assume that you get not an id but a position
to get an id on a click from the box you need to:
1) use the cursoradapetr
2) the primary key in should be called "_id"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question