1
I have a question when giving a select, because I have 3 tables, they are professionals, experiences, address.
Let’s say I have a professional and this professional has more than 2 experiences. There is some way to bring on a line this information, if not how can I do it in php, so that it does not repeat the name of the professional.
Tables:
Professional:
id
name
surname
civil state
experiences:
id
office
dt_input
dt_output
id_professional
My select for now is so
SELECT pro.id, pro.nome, exp.cargo
FROM Profissional pro
INNER JOIN experiencias exp ON exp.id_profissional = pro.id
WHERE pro.id = :algumacoisa GROUP BY pro.id
Example of an exit
We have 1 professional with 2 registered positions.
ID Nome Cargo Cargo
1 romario programador Técnico
I know the table name doesn’t repeat itself, but if you have a solution, I’d appreciate it.
Tried to use Inner Join?
– rray
You’ll need to use both Mysql and PHP to do this. Post table structures to help you.
– Diego Souza
Okay, I was able to illustrate a little more my doubt.
– Romario Pires