1
In a table that contains some comments, one of the columns stores the ID of the user who made this comment, how can I recover the data of that user with the ID at the time of making a query in the comment table? I know I can make two select one after the other, but if possible I would like to recover all the data in one select.
Comment table:
+----------------+-------------+------+-----+---------+
| id_usuario | serie | data | comentario |
+----------------+-------------+------+-----+---------+
| varchar(255) | varchar(255)| date | varchar(255) |
+----------------+-------------+------+-----+---------+
User table:
+----------------+-------------+------+------+
| id_usuario | apelido | email |
+----------------+-------------+------+------+
| varchar(255) | varchar(255)| varchar(255)|
+----------------+-------------+------+------+
How would the select look?
It would be interesting to add the structure of the tables, to facilitate the answer.
– user28595
I updated with a part of the two tables
– Leo Letto