echo diferent coluns from left join
| From: | Rodrigo Peres | Date: | Thu, 10 Jan 2002 16:49:32 +0000 |
| Subject: | echo diferent coluns from left join | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80045@lists.php.net to get a copy of this message | ||
Dear List,
I have this sql command that grabs a result of 3 tables. What i want is if
there's a way to do a while printing the site and url and after it's finish
begin, printing site_2 and url_2.
SELECT celebridades.*, links_relacionados.Nome_Link as
site,links_relacionados.Url_link as url, fanclubes.Nome as
site_2,fanclubes.Site as url_2
FROM celebridades LEFT JOIN links_relacionados ON
links_relacionados.CelebID=celebridades.CelebID LEFT JOIN fanclubes ON
fanclubes.CelebID=celebridades.CelebID WHERE celebridades.CelebID='$celebID'
Thank's in advance
Rodrigo Peres