Get the db you want when you click on the view

Asked 2 years ago, Updated 2 years ago, 82 views

Data imported from mysql has been scattered in the list view. When I click on the item in the list view, I'd like to show you other information about the data in pop-up format. There is a column called ID on the table and this is the primary key. When I click on an item, I want to bring the ID of the item and show the row with the ID in a pop-up form, but I don't know what to do. Please give me directions I beg you.

android mysql listview

2022-09-22 19:53

2 Answers

I don't know why you don't have a clue, but I'm sure you're saving dataset to express ListView, so when you click on the list item, shouldn't you take the dataset corresponding index value as a position of the item and process it later?


2022-09-22 19:53

The information given is a little insufficient. But if I were to tell you

const sql = 'SELECT * FROM table name WHERE id=?';
            connection.query(sql, [id], function (err, table name, fields) {

Why don't you try it this way?


2022-09-22 19:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.