Gossamer Forum
Home : Products : DBMan : Customization :

Stupid Question Re: Drop Down Boxes

Quote Reply
Stupid Question Re: Drop Down Boxes
I seem to remember reading somewhere that you can integrate a databse into another database. For instance I would like to keep a database of Genres for movies, with each Genre linking to a page for that Genre. I would then like to be able when I add my movie review to select from a drop down list the genre that the film fits. Then when the record is displayed, the Genre can be called (along with a link to that genre page). If this is too complicated or not possible, I can go about it another way. Just wondering.

-Blake
Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
First off, there aren't many stupid questions. (There are a some, but I've never seen one on any of the forums here. Smile )

I see two questions here.

The first is about a select list from another database. Check out http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/001373.html
especially my post from August 04, 1999 11:20 PM PST. That should give you the code you need. If you have any questions, don't hesitate to ask.

The second question is about a link to the genre database, I think. I'm not sure exactly. What do you envision to be in your genre database?

------------------
JPD





Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
OK, i read the other thread and that works perfectly. Now let's say I select "comedy" as the genre from the drop down field I've created. The $rec{'Genre'} will then produce an output of comedy - correct? Now then associated with the "comedy" record in the first database is a URL to, let's say, http://www.outermost.net/comedy. When the genre, 'comedy' is output, can i have it be linked to the above URL? It would involve calling another field from the first database. If not, I'll just use two drop down boxes and match them up.

-Blake
Confusing enough yet?
Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
Sure. You could have it linked to the other url. You'd have something like

<a href="http://www.outermost.net/$rec{'Genre'}">

Is that what you had in mind?

Glad the code worked for you. Smile

------------------
JPD





Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
I guess that would work - not exactly what I had in mind though. For instance if the URL for comedy was http://www.outermost.net/genre.html?29382, it wouldn't work. I don't need this now, because I'm going to use the way that you just mentioned, but for future use, it would be nice to know if this could work.

Another example, I have an Actors database. Cameron Diaz (Actor) is 74003 (ActorNum), how can I have a drop down with a list of actors and then do this:

<a href="http://www.outermost.net/actor.asp?actor=$rec{'ActorNum'}">$rec{'Actor'}</a>

Thanks,
Blake
Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
Oh.

I'll have to work on this tomorrow when my brain is a little fresher.

Is there a reason that the genre is a number and not the name of the genre?

Regarding the actors, that's a bigger problem, since there would be a varying number of actors for each film. I suppose you could set up fields for what you think would be the maximum number of actors, but that's pretty iffy to do.

------------------
JPD





Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
I'll only have a max of 4 actors per film.

-Blake
Quote Reply
Re: Stupid Question Re: Drop Down Boxes In reply to
So are you trying to set up a relational database with a genre table and an actor table? It can be done, but it's a pretty hairy thing to do.


------------------
JPD