Pessoal,

esse post teve a colaboração de um aluno (Leandro) do treinamento de BD com MySQL para programadores PHP que estou ministrando. O Bug é referente aos ALIAS das colunas na consulta.

 

VEJAM A CONSULTA ABAIXO SEM UTILIZAR AS:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U0VMRUNUIGVtcF9pZCBJRCwgZm5hbWUgTm9tZSwgbG5hbWUgU29icmVub21lCkZST00gZW1wbG95ZWUKT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDOw==” hover_enabled=”0″]U0VMRUNUIGVtcF9pZCBJRCwgZm5hbWUgTm9tZSwgbG5hbWUgU29icmVub21lCkZST00gZW1wbG95ZWUKT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDOw==[/et_pb_dmb_code_snippet]

Retorno do Workbench:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U0VMRUNUIGVtcF9pZCBJRCwgZm5hbWUgTm9tZSwgbG5hbWUgU29icmVub21lIEZST00gZW1wbG95ZWUgT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDIEVycm9yOiBJbmRleCBvdXQgb2YgcmFuZ2Uu” hover_enabled=”0″]U0VMRUNUIGVtcF9pZCBJRCwgZm5hbWUgTm9tZSwgbG5hbWUgU29icmVub21lIEZST00gZW1wbG95ZWUgT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDIEVycm9yOiBJbmRleCBvdXQgb2YgcmFuZ2Uu[/et_pb_dmb_code_snippet]

Retorno do Prompt MySQL:

AGORA MUDANDO A CONSULTA PARA UTILIZAR AS:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U0VMRUNUIGVtcF9pZCBBUyBJRCwgZm5hbWUgQVMgTm9tZSwgbG5hbWUgQVMgU29icmVub21lCkZST00gZW1wbG95ZWUKT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDOw==” hover_enabled=”0″]U0VMRUNUIGVtcF9pZCBBUyBJRCwgZm5hbWUgQVMgTm9tZSwgbG5hbWUgQVMgU29icmVub21lCkZST00gZW1wbG95ZWUKT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDOw==[/et_pb_dmb_code_snippet]

Retorno do Workbench:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U0VMRUNUIGVtcF9pZCBBUyBJRCwgZm5hbWUgQVMgTm9tZSwgbG5hbWUgQVMgU29icmVub21lIEZST00gZW1wbG95ZWUgT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDIExJTUlUIDAsIDEwMDAgMTkgcm93KHMpIHJldHVybmVk” hover_enabled=”0″]U0VMRUNUIGVtcF9pZCBBUyBJRCwgZm5hbWUgQVMgTm9tZSwgbG5hbWUgQVMgU29icmVub21lIEZST00gZW1wbG95ZWUgT1JERVIgQlkgU29icmVub21lIERFU0MsIE5vbWUgQVNDIExJTUlUIDAsIDEwMDAgMTkgcm93KHMpIHJldHVybmVk[/et_pb_dmb_code_snippet]

Retorno do Prompt MySQL:

Era agradeço a colaboração do Leandro novamente.

Versão Workbench: 5.2.37 CE Revision 8576

Att,
capin