-1
It is possible to select all 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 verify if the ID user I am trying to register in the bank already exists.
This, so that the user does not have to wait to fill 30 fields and just by 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
where the Yes searches ALL user data already registered in the database and shows on screen, and the option Not remains on the same screen.
With that, I need that, all the columns of the ID typed in the first field, are displayed.
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 the ID 3 - I am warned that this id already exists and I click on Yes in the confirmdialog
because I want to make sure that this user is the same one that I’m trying to register.
When I click on Yes, one SELECT
get in the DB and displays within the respective fields:
3 , 31, 13, 8888-8888.
Is that possible? If anyone can show me how to do I thank you.
I tried several things. Among them:
SELECT * FROM userinfo WHERE ID '"+IdTextField+"';
And several other ways, but none of them had the effect I need.
PS: I’m trying to display the data by SELECT
, on the same screen I typed the ID existing.
Didn’t you mean: SELECT * FROM userinfo WHERE ID = '"+Idtextfield+"' ? You’d better edit your question and make a better explanation, she’s very confused.
– wryel
Do you want to check while filling out the form for any user with any of the information being typed as soon as the user changes the field? That’s it?
– Erlon Charles
Post the code that didn’t work.
– Skywalker
That’s exactly what @Erloncharles said!
– Bruno Kommers
You just need to retrieve all the columns of a listed tuple or something else? If anything else, talk concretely, what? If you are just going to retrieve the columns, see the answer below, please.
– Bruno César