2
I want to concatenate values from different records, for example, I have the table below:
| id | value |
| 1 | valor1 |
| 2 | valor2 |
| 3 | Valor3 |
To show the following result: value1, value2, Valor3
I’m using PHP + Mysql.
2
I want to concatenate values from different records, for example, I have the table below:
| id | value |
| 1 | valor1 |
| 2 | valor2 |
| 3 | Valor3 |
To show the following result: value1, value2, Valor3
I’m using PHP + Mysql.
3
Just use the function GROUP_CONCAT
mysql.
SELECT GROUP_CONCAT(campo SEPARATOR ', ')
FROM tabela;
Browser other questions tagged php mysql sql
You are not signed in. Login or sign up in order to post.