I have a custom table with 2 columns:
Info
Type (a select: Long_Text, Short_Text)
I can display any text entry with this random global:
my $tbl = $DB->table('TRandomText');
$tbl->select_options('ORDER BY RAND()','LIMIT 1');
my $item = $tbl->select()->fetchrow_hashref;
return $item->{Info};
}
but how to display only, say Short_Text by specifying this in the template?
So something like - <%Rand_Text('Short_Text')%>
Complicated?
~ ERASER
Free JavaScripts @ Insight Eye
Info
Type (a select: Long_Text, Short_Text)
I can display any text entry with this random global:
Code:
sub { my $tbl = $DB->table('TRandomText');
$tbl->select_options('ORDER BY RAND()','LIMIT 1');
my $item = $tbl->select()->fetchrow_hashref;
return $item->{Info};
}
but how to display only, say Short_Text by specifying this in the template?
So something like - <%Rand_Text('Short_Text')%>
Complicated?
~ ERASER
Free JavaScripts @ Insight Eye