Damn it - still having issues :(
Seems that for some reason, the TEXTAREA is not being filled correctly - I was thinking maybe it was cos it needed \r\n - and not just \n ... but that still didn't sort it :/
$tbl->select_options('ORDER BY Name ASC');
my $sth = $tbl->select( ) || die $GT::SQL::error;
my @loop;
while (my $hit = $sth->fetchrow_hashref) {
push @loop, $hit->{Name};
}
print qq|<h2>Updated PartOfAffilite field, with the following entries:</h2>| . join('<br />',@loop);
my $editor = $DB->editor('Links');
$editor->alter_col('PartOfAffiliate', {
type => 'CHAR',
size => '255',
form_names => join("\r\n",@loop),
form_values => join("\r\n",@loop),
form_type => 'SELECT',
form_size => 1,
form_display=> 'Part of Affiliate Program'
}) || die $GT::SQL::error;
...shows fine in the .def file - but obvioulsy not quite formatted right :/
'form_display' => 'Part of Affiliate Program',
'form_names' => 'another test
Program 1
test',
'form_size' => '1',
'form_type' => 'SELECT',
'form_values' => 'another test
Program 1
test',
'pos' => '68',
'size' => '255',
'type' => 'CHAR'
},
Anyone got any suggestions?
Cheers
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!
Seems that for some reason, the TEXTAREA is not being filled correctly - I was thinking maybe it was cos it needed \r\n - and not just \n ... but that still didn't sort it :/
Code:
my $tbl = $DB->table('AffiliatePrograms'); $tbl->select_options('ORDER BY Name ASC');
my $sth = $tbl->select( ) || die $GT::SQL::error;
my @loop;
while (my $hit = $sth->fetchrow_hashref) {
push @loop, $hit->{Name};
}
print qq|<h2>Updated PartOfAffilite field, with the following entries:</h2>| . join('<br />',@loop);
my $editor = $DB->editor('Links');
$editor->alter_col('PartOfAffiliate', {
type => 'CHAR',
size => '255',
form_names => join("\r\n",@loop),
form_values => join("\r\n",@loop),
form_type => 'SELECT',
form_size => 1,
form_display=> 'Part of Affiliate Program'
}) || die $GT::SQL::error;
...shows fine in the .def file - but obvioulsy not quite formatted right :/
Code:
'PartOfAffiliate' => { 'form_display' => 'Part of Affiliate Program',
'form_names' => 'another test
Program 1
test',
'form_size' => '1',
'form_type' => 'SELECT',
'form_values' => 'another test
Program 1
test',
'pos' => '68',
'size' => '255',
'type' => 'CHAR'
},
Anyone got any suggestions?
Cheers
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!