0
My bank is like this:
cd_cliente | nr_ddd | nr_telefone
30 | 11 | 25622791
30 | 11 | 25622791
My select is so:
"SELECT * FROM tb_telefones WHERE nr_ddd="+ddd+" AND nr_telefone="+telefone+"";
It returns from the database from the ddd and phone parameters, the numbers that are equal to them.
I want that from these parameters (parameters nr_ddd and nr_phone), it returns the value of cd_client, and make a new query, returned to the ddds and phones that have cd_client equal.
Your question is confused. Re-read and adjust so we can help you. If possible inform the structure of the tables and be clearer about what you need.
– TonCunha