Answer the question
In order to leave comments, you need to log in
How to add data from the first table with data from the second table in one mysql query?
There are two tables
item
id | name | color
1 | orange | yellow
2 | Apple | red
3 | Pear | green
photo
id | id_item | name_file_jpg
1 | 1 | wauhmaifml2
| 1 | wmacawowa
3 | 1 | mdv21kmzxi
4 | 2 | wauhawffml
5 | 3 | nalwfjnawfb
6 | 3 | cijxx9pb8jxa
How can I get the full output of the first item table from these tables and, in addition, only the first record of the name_file_jpg field from the second table?
That is, something in the style of
id | name | color | name_file_jpg
1 | orange | yellow | wauhmaifml
2 | Apple | red | wauhawffml
3 | Pear | green | nalwfjnawfb
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question