You are here: Re: Linking tables to display data? « PHP Programming Language « IT news, forums, messages
Re: Linking tables to display data?

Posted by Garry Jones on 10/20/06 06:50

"Rik" <luiheidsgoeroe@hotmail.com> skrev i meddelandet
news:3738b$4538401e$8259c69c$11497@news1.tudelft.nl...

Largely based on your answer I did a lot of testing and finally arrived at

$ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening
ON(scfmforening.scfmnum=ml_lopp.scfmnum)';

Which works fine. (I needed the * as this was part of a larger list and
thought this answer may help some other baffled person in the future).

Put simply the code I am using is

SELECT *
FROM tabell1
LEFT JOIN tabell2
ON(tabell1.field=tabell2.matchingfield);

I can then access all values in table1 and for the matching field all values
in the corresponding record of the other table.

Thanks for your help

Garry Jones
Sweden

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация