I have a problem in which the same query executed on the local server and production returns a different result. The production version is coming incomplete in the AVALIACOES field. I checked the mysql version of the server and local and they are different. Why should this problem be happening? Here is the data for analysis:
QUERY
SELECT A.*,
L.nome AS localidade,
CA.nome AS cargo,
(
SELECT GROUP_CONCAT( CONCAT( AT.id, '=', AT.telefone, ';', AT.observacao ) SEPARATOR '{{separador}}' )
FROM tal_a_c_alunos_telefones AS AT
WHERE AT.aluno_id = A.id
) AS telefones,
(
SELECT GROUP_CONCAT( T.nome SEPARATOR ', ' )
FROM tal_a_c_turmas_alunos AS TA
LEFT JOIN tal_a_c_turmas AS T
ON TA.turma_id = T.id
WHERE TA.aluno_id = A.id
) AS turmas,
(
SELECT GROUP_CONCAT( C.nome SEPARATOR ', ' )
FROM tal_a_c_turmas_alunos AS TA
LEFT JOIN tal_a_c_turmas AS T
ON TA.turma_id = T.id
LEFT JOIN tal_a_c_cursos_turmas AS CT
ON T.id = CT.turma_id
LEFT JOIN tal_a_c_cursos AS C
ON CT.curso_id = C.id
WHERE TA.aluno_id = A.id
) AS cursos,
(
SELECT GROUP_CONCAT( CONCAT( C1.nome, '{{td}}' , AV.nome, '{{td}}', AV.peso, '{{td}}', AA.nota ) SEPARATOR '{{tr}}' )
FROM tal_a_c_alunos_avaliacoes AS AA
LEFT JOIN tal_a_c_avaliacoes AS AV
ON AA.avaliacao_id = AV.id
LEFT JOIN tal_a_c_cursos AS C1
ON AA.curso_id = C1.id
WHERE AA.aluno_id = A.id
) AS avaliacoes,
(
SELECT COUNT(*)
FROM tal_a_c_alunos_avaliacoes AS AA
LEFT JOIN tal_a_c_avaliacoes AS AV
ON AA.avaliacao_id = AV.id
LEFT JOIN tal_a_c_cursos AS C2
ON AA.curso_id = C2.id
WHERE AA.aluno_id = A.id
) AS avaliacoes_realizadas,
DATE_FORMAT( A.data_inicio, '%d/%m/%Y' ) AS data_inicio,
DATE_FORMAT( A.data_conclusao, '%d/%m/%Y' ) AS data_conclusao
FROM tal_a_c_alunos AS A
LEFT JOIN tal_a_c_localidades AS L
ON A.localidade_id = L.id
LEFT JOIN tal_a_c_cargos AS CA
ON A.cargo_id = CA.id
ORDER BY A.nome
LOCALHOST
RESULT:Inthiscase,itisimportanttounderstandtheroleofthestudentinthelearningprocess,andinthisway,10{{tr}}AwarenessforEaD{{td}}Groupmotto{{td}}1{{td}}10{{tr}}AwarenessforEaD{{td}}Whoaremycolleagues?{{td}}1{{td}}10{{tr}}AwarenessofEaD{{td}}Poll{{td}}1{{td}}10{{tr}}TeleListsSite{{td}}CreatingDomains{{td}}1{{td}}6.75{{tr}}TeleListasSite{{td}}EditorialComposition{{td}}2{{td}}8{{tr}}TeleListasSite{{td}}FinalEvaluation{{td}}1{{td}}8{{tr}}TeleListsSite{{td}}Whydoesacompanyneedtohaveawebsite?{{td}}2{{td}}10{{tr}}}{{tt}}{{tt}}{{tt}}{{tt}}Whydonotcompaniesgettheexpectedsuccessontheinternet?
*Theboldpartismissingfromtheproductionresult
PRODUCTION
RESULT: In this case, it is important to understand the role of the student in the learning process, and in this way, 10 {{tr}} Awareness for EaD {{td}} Group motto {{td}} 1 {{td}} 10 {{tr}} Awareness for EaD {{td}} Who are my colleagues? {{ td}} 1 {{td}} 10 {{tr}} Awareness for EaD {{td}} Poll {{td}} 1 {{td}} 10 {{tr}} TeleLists Site