Answer the question
In order to leave comments, you need to log in
How to change id to title when selecting in related tables?
Hello.
I have two tables: Performances and Author.
I created these tables in phpmyadmin and linked them with a foreign key.
The performance has several fields, among them: the name of the performance, "id spect" and "id author".
The author table contains: "author id" and "fullname" - full name.
The author id of the play and the author id of the author table are linked. How to make it so that when selecting from the Performances table, instead of id author, fullname comes out.
By the way, when I fill in the author id data in the Performance table, there are links with id author and fullname separated by a dash
(1 - Alexander Sergeevich Griboyedov).
Answer the question
In order to leave comments, you need to log in
For how to solve this within SQL, see JOIN . Well, in principle, if you have only these two entities, then, I assume that you do not need a normal form (see denormalization )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question