Good afternoon, I have a table called Pessoa
and another Matricula
, I need to make a query that returns the fields name , enrollment and seq_people , where name and seq_people are in the Pessoa
table and matricula in the Matricula
table to return in select that each informed letter fetches in the BD passing the letters informed.
Example 1
He will make the query as he inserts the letters.
Thisselectthisasfollows,itworksforwhatitneedsinanotherfield.
SELECTseq_pessoaASid,UPPER(nome)AStextFROMpessoaWHEREnomeILIKE'%". $nome ."%'
Doubt
But now I have the following select that is not working correctly
SELECT m.matricula AS id
, UPPER(p.nome) AS text
FROM matricula as m
JOIN pessoas as p USING (seq_pessoa)
What I need is rather than enter the user name, enter the registration code and it will return the user's name.