1
Good evening guys, I do not know if someone has been through this, but I need to convert the result of a search in mysql in columns, is not to exchange the rows for the columns, but rather, make some results become the column titles.
Being:
NOME DATA
fulano 2016-01-10
fulano 2016-02-15
fulano 2016-03-10
beltrano 2016-01-10
ciclano 2016-02-15
ciclano 2016-03-10
beltrano 2016-04-10
Should stay like this:
NOME 2016-01-10 2016-02-15 2016-03-10 2016-04-10
fulano X X X
beltrano X X
ciclano X X
Since these dates are dynamic, stored in another table in the database.
I do not know if it is possible to do this kind of query, but I appreciate the help of all.
what would be the value x?
– user45474
That would be a table of presence?
– user28595
Exactly, it is a table of presence. The value X would be replaced by F or P.
– Leandro Menezes