I'm having a problem that I have not found a solution to date. I have 3 tables in MySQL:
- Units: containing store information.
- Orders: Contains the order information made by store01 for store02, both of which are listed in the units table.
- Users: and lastly users with information of who placed the request.
TheproblemiswhenItrytoretrievethesourceanddestinationinformationthatarebothinthedrivestable.
SELECTped.cod_pedido,ped.origem,ped.destino,ped.obs,ped.usuario,und.nome_unidadeFROMpedidosaspedINNERJOINusuariosasusrON(ped.usuario=usr.cod_user)INNERJOINunidadesasundON(ped.origem=und.cod_unidades)
ButinthiswayIcannotretrievetheinformationIneedjustreturnstheseresults:
I would like to make the drive names appear instead of your code.
Could anyone help me?