You are here: Re: Get ID's from two different tables « PHP SQL « IT news, forums, messages
Re: Get ID's from two different tables

Posted by ZeldorBlat on 10/30/05 07:01

It sounds like you want to outer join the tables to that you get all
the rows, even if they don't have a flag. So if, according to your
example, Table2 is the one with 10 rows and Table1 is the one with 7
rows, you could do this:

select t2.*, t1.flag
from table2 t2
left outer join table1 t1
on t2.statusid = t1.statusid

 

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

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