Gossamer Forum
Quote Reply
Selecting via Template
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:

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
Quote Reply
Re: [Eraser] Selecting via Template In reply to
Sorry, not quite sure what you want?

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates