MySQL Forums
Forum List  »  General

Select from a different table based upon the name in a field?
Posted by: Andrew Phillipo
Date: November 19, 2004 12:25PM

I am designing a CMS and I want it to be able to allocate certain structures anywhere within the design.

So for example I might be selecting Adverts, FAQs, Special Offers, Polls, News, or the Search Box or Login Box that can be contained within a particular column (by that I mean page column), in any order.

As a minimum I need to express what will be in each column at each time, extract that list from the database and query based upon that - so I build an array that has something like arr[0] = {<elementtype>,<elementid>}. Where <elementtype> is the type of element (referencing the appropriate entity) and elementid is an id for that element within its table. There would also be an order column. My worry is that it could be very inefficient.

If its possible to select on the fly the information I need that would be great.

If anyone has anything to say on this I would REALLY like to hear about it - even if its just the words 'stupid idea'...

How would you do this?

Thanks Everyone.

Options: ReplyQuote


Subject
Written By
Posted
Select from a different table based upon the name in a field?
November 19, 2004 12:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.