Is it possible to select all the columns of a row?
I have a function where, on the screen where the user will be created, a validation is made in the first field typed to see if the ID of the user that I am trying to register in the database already exists.
This is so that the user does not have to wait to fill 30 fields and only when clicking create, be warned that the user in question already exists.
When I type the ID of the existing user and move to the next field, a confirmDialog
appears where Yes searches ALL user data already registered in the bank and screen displays, and the No option remains on the same screen.
With this, I need to display all the columns of the ID in the first field.
cd_telefone|cd_cliente |nr_ddd |nr_telefone
1 | 30 | 11 |2562-2791
2 | 30 | 11 |2562-2791
3 | 31 | 13 |8888-8888
4 | 30 | 11 |5555-5555
5 | 30 | 13 |9623-54002
6 | 30 | 11 |1111-2525
Example: I typed ID 3 - I am warned that this id already exists and I click on Yes on the confirmdialog
because I want to make sure this user is the same one I'm trying to register.
When I click on Yes , a SELECT
will fetch in DB and display within the respective fields:
3 , 31, 13, 8888-8888.
Is this possible? If anyone can show me how to do it, I appreciate it.
I tried several things. Among them:
SELECT * FROM userinfo WHERE ID '"+IdTextField+"';
And several other forms, but none of them had the effect I need.
PS: I'm trying to display the data by SELECT
, on the same screen that I typed the ID .