You are here: Re: Can I use an either/or query? « PHP Programming Language « IT news, forums, messages
Re: Can I use an either/or query?

Posted by Bob Sanderson on 03/23/06 16:22

noone <noone@nowhere.com> wrote in
news:c0be99a872d26915da7bafc7d45c7ae6$1@somehostoutintheEther.com:

> A general rule is to explicitly specify each column in each field.
> One method is a Left Outer Join.
>
>
> select a.id, a.data1,a.data2,b.data1,b.data2 from
> tablea a left outer join tableb b on a.id=b.id where a.id like
> ('$searchterm')
>
> b.data1 and b.data2 will be NULL if there is no data from items table.

Works great, thanks.

 

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

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