Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [brewt] Format of alter_col

Quote Reply
Re: [brewt] Format of alter_col In reply to
Sorry, being really dense still Frown

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)

Frown

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!
Subject Author Views Date
Thread Format of alter_col Andy 7671 Jul 14, 2008, 1:27 AM
Thread Re: [Andy] Format of alter_col
Andy 7534 Jul 14, 2008, 1:42 AM
Post Re: [Andy] Format of alter_col
Andy 7479 Jul 14, 2008, 6:46 AM
Thread Re: [Andy] Format of alter_col
Andy 7482 Jul 14, 2008, 7:46 AM
Thread Re: [Andy] Format of alter_col
brewt 7492 Jul 14, 2008, 3:01 PM
Thread Re: [brewt] Format of alter_col
Andy 7487 Jul 14, 2008, 11:42 PM
Thread Re: [Andy] Format of alter_col
brewt 7469 Jul 14, 2008, 11:55 PM
Thread Re: [brewt] Format of alter_col
Andy 7487 Jul 15, 2008, 12:00 AM
Thread Re: [Andy] Format of alter_col
brewt 7478 Jul 15, 2008, 12:03 AM
Thread Re: [brewt] Format of alter_col
Andy 7494 Jul 15, 2008, 12:09 AM
Post Re: [Andy] Format of alter_col
Wychwood 7444 Jul 15, 2008, 2:15 AM