MySQL Forums
Forum List  »  PHP

inner join envolvendo 3 tabelas
Posted by: Cícero Araújo
Date: August 26, 2005 01:41PM

php/mysql/apache
Porque esta query não me retorna registros?

/*$com = "select didusuario.*, unidade.IdentUnid, unidade.DescUnidade as wwdescunidade, ";
$com.= " lotacao.IdentLotacao, Lotacao.SiglaLotacao as wwsiglalotacao ";
$com.= " from didusuario LEFT JOIN (unidade on unidade.IdentUnidade=didusuario.IdentUnid) ";
$com.= " LEFT JOIN lotacao on lotacao.IdentLotacao = didusuario.Identlot ";
$com.= " order by didusuario.Nome";
*/
tabela principal
codunidade (n)
codlotacao (n)

tabela unidade
codunidade (n)
descricaounidade (string) eh esta descricao que preciso

tabela lotacao
codlotacao (n)
descricaolotacao (string) e também esta descricao

Fortissimo abraço

Options: ReplyQuote


Subject
Written By
Posted
inner join envolvendo 3 tabelas
August 26, 2005 01:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.