Heya all,
A while ago I asked how to automatically generate dropdown or form fields from your DB. Alex came up with some code that works fine for generating this from the tables the local LinksSQL installation. (See that post here)
I have 4 installations of LinksSQL and would like to generate form fields in the one install from DB values in the tables of another. Both instances of LinksSQL is on the same domain.
In other words, I have a Gear Review db with all the brands of gear listed in DB1. In DB2 is a Stolen Gear db and I'd like to automatically generate a dropdown of all the possible gear brands from DB1 for them to choose from when they list a stolen item.
Here's the piece of code Alex wrote to generate it from the local DB:
my $html = $DB->html ( ['Users'], $IN );
return $html->select ( { name => 'Status', value => 'Default' }); }
Any ideas on how to modify this to do what I described above?
Safe swoops
Sangiro
A while ago I asked how to automatically generate dropdown or form fields from your DB. Alex came up with some code that works fine for generating this from the tables the local LinksSQL installation. (See that post here)
I have 4 installations of LinksSQL and would like to generate form fields in the one install from DB values in the tables of another. Both instances of LinksSQL is on the same domain.
In other words, I have a Gear Review db with all the brands of gear listed in DB1. In DB2 is a Stolen Gear db and I'd like to automatically generate a dropdown of all the possible gear brands from DB1 for them to choose from when they list a stolen item.
Here's the piece of code Alex wrote to generate it from the local DB:
Quote:
So let's assume we are dealign with the Status field in the User table which has values 'Not Validated', .., 'Administrator'. We want to build a select list out of this now. I think this would be the quickest way:Code:
sub { my $html = $DB->html ( ['Users'], $IN );
return $html->select ( { name => 'Status', value => 'Default' }); }
Any ideas on how to modify this to do what I described above?

Safe swoops
Sangiro