You are here: Re: Mix two tables in a single SELECT statement - not a join « PHP Programming Language « IT news, forums, messages
Re: Mix two tables in a single SELECT statement - not a join

Posted by Erwin Moller on 11/16/82 11:31

bizt wrote:

> Hi,
>
> I have an Intranet with the organisation I work with. In this
> organisation there are two departments - community department and press
> office. Both the community department and press office have thier own
> news system where they can add news in their own admin section that
> will appear on their homepages. Both admin section have their own DB
> table thus two seperate tables.
>
> I would like to select all the rows from both tables in a single SELECT
> statement so when I output them they will be integrated. This is not
> the same as a table join as their are no keys and I want the rows from
> both to remain seperate. Can this be done? Could someone please post an
> example SQL statement demonstrating this if so?
>
> Thanks
>
> Burnsy


Hi Burnsy,

Do you want to use two different datasources in 1 single query?
I think you are making things overcomplicated.

Why don't you query both datasources seperately, and then in PHP decide
which one to show in your unified 'resultset' ?

Regards,
Erwin Moller

 

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

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