Sorry, being really dense still
print $IN->header;
print $css;
my $tbl = $DB->table('AffiliatePrograms');
$tbl->select_options('ORDER BY Name ASC');
my $results = $tbl->select( ['Name'] )->fetchall_arrayref;
use Data::Dumper;
print Dumper($results);
# print qq|<h2>Updated PartOfAffilite field, with the following entries:</h2>| . join('<br />');
my $editor = $DB->editor('Links');
$editor->alter_col('PartOfAffiliate', {
type => 'CHAR',
size => '255',
form_names => $results,
form_values => $results,
form_type => 'SELECT',
form_size => 1,
form_display=> 'Part of Affiliate Program'
}) || die $GT::SQL::error;
print qq|<br /><br />DONE|;
}
..this bit seems to look ok;
print Dumper($results);
..yet the values show up as:
ARRAY(0x8fd3170)
ARRAY(0x8fd3194)
Sorry to keep bugging you with this one. Had a bit of a heavy night last night and my heads killing me :(
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
sub UpdateLinksTable { print $IN->header;
print $css;
my $tbl = $DB->table('AffiliatePrograms');
$tbl->select_options('ORDER BY Name ASC');
my $results = $tbl->select( ['Name'] )->fetchall_arrayref;
use Data::Dumper;
print Dumper($results);
# print qq|<h2>Updated PartOfAffilite field, with the following entries:</h2>| . join('<br />');
my $editor = $DB->editor('Links');
$editor->alter_col('PartOfAffiliate', {
type => 'CHAR',
size => '255',
form_names => $results,
form_values => $results,
form_type => 'SELECT',
form_size => 1,
form_display=> 'Part of Affiliate Program'
}) || die $GT::SQL::error;
print qq|<br /><br />DONE|;
}
..this bit seems to look ok;
print Dumper($results);
..yet the values show up as:
Quote:
ARRAY(0x8fd314c) ARRAY(0x8fd3170)
ARRAY(0x8fd3194)
Sorry to keep bugging you with this one. Had a bit of a heavy night last night and my heads killing me :(
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!