Hello people.
I have a DB in SQLite that has two columns “id” and “class”.
When calling a certain Screen I want to create a new List_View_Text_and_Image.
And that they possess in Title and Subtitle the respective fields.
I am able to call the data and create the list_view_text_and_image.
However, the data is being “replicated.”
For example: let’s say there are 5 records in the DB with the Id of 1 to 5 and their names (Mauricio, Carla, Katia, Neto, Paula). He is creating the 5 List_View_Text_and_Image, but plays the same information
For each of them.
It’s like,
(1, 2, 3, 4, 5)
(Mauricio, Carla, Katia, Neto, Paula)
(1, 2, 3, 4, 5)
(Mauricio, Carla, Katia, Neto, Paula)
(1, 2, 3, 4, 5)
(Mauricio, Carla, Katia, Neto, Paula)
(1, 2, 3, 4, 5)
(Mauricio, Carla, Katia, Neto, Paula)
(1, 2, 3, 4, 5)
(Mauricio, Carla, Katia, Neto, Paula)
I am returning the above data but should return:
1
Mauricio
2
Carla
3
Katia
4
Neto
5
Paula
Does anyone know the best way to do this, either with “For each” or “While” ??