F
F
FEDKOTV2020-05-26 22:03:14
MySQL
FEDKOTV, 2020-05-26 22:03:14

How to get the result as a single line?

Table. The structure is as follows:

id | product_id | property_id | property_name
1  | 100            | 12               | lorem ipsum
2  | 100            | 13               | dolar sit
3  | 101            | 12               | lorem ipsum
4  | 101            | 13               | dolar sit
5  | 102            | 12               | lorem ipsum
6  | 102            | 13               | dolar sit

You need to display the result in one line.
Product_ID: 100. Lorem ipsum dolar sit
Product_ID: 102. Lorem ipsum dolar sit
Product_ID: 103. Lorem ipsum dolar sit

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-05-26
@FEDKOTV

https://phpdelusions.net/pdo/fetch_modes#FETCH_GROUP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question