I have the author and phrase tables:
autor:
autor_id | autor_nome
1 | joão
2 | pedro
frase:
frase_id | frase_frases |autor_id
1 | frase do joão | 1
2 | frase do pedro | 2
3 | frase do pedro | 2
4 | frase do pedro | 2
How do I display the name "pedro" and all "pedro's phrase"?
I tried with inner join but without success!
SELECT * FROM author INNER JOIN phrase ON author.autor_id = sentence.autor_id