Gossamer Forum
Home : Products : DBMan : Discussions :

Select Fields

Quote Reply
Select Fields
Hello

First time. Just learn perl. Just got this up and running.

I have 2 questions about select fields.

1. Can you have a flat file that you can read the select fields in from?

2. I am think I might have a reason to have 2 data base going. I can see where if I was able to make the select files in Data base 2 be the create from a certain filed from Data base 1.

Example

Data Base 1

1|Jim|Bob|123 front|nowhere|AL|I like nothing|
2|Bob|Jim|234 howard|somewhere|TN|I like everything|
3|Billy|Bob|987 metoo|everywhere|CA|I like you|

Database 2

In the Add form

Select fields First Name have "jim,bob,billy" as its options.

I hope I made this clear. If not please let me know.


Thank you all. So far I love this. Just wish I knew perl better.


Quote Reply
Re: Select Fields In reply to
ummm ... you don't need 2 databases to do that 1 should do fine. I have something similar but it makes a menu tree instead of the links and cuts out the repeats ... dam I forgot the name but I'm sure sure if you check these resource areas you'll find it:

You may want to check our JPDeni's excellent DBMan tutorial.
http://jpdeni.com/dbman

And LoisC's excellent resource
Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/


Thanks to them both.


was it list categories ??

you can also do something with a sub from db.cgi called which probably will be easier to do --- actually this should be what you need ....

sub build_select_field_from_db

it's easy to use and very similar to what's already is being used in the default html.pl for building the categories ... all you need to do is add _from_db to sub build_select_field in html.pl and make sure you have data already to build from.


good luck sorry is this post was longer than necessary

**************************************
on the pages in between ...