Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Links
:
Development, Plugins and Globals
:
category list
Previous Thread
Next Thread
Print Thread
View Threaded
Jul 2, 2002, 12:38 PM
xpert
User
(277 posts)
Jul 2, 2002, 12:38 PM
Post #1 of 6
Views: 3325
Shortcut
category list
How can i generate a category list in this format?
001 auctions
002 dating
003 fighting
004 freebies
005 gambling
006 gaming
007 google
008 misc.
009 msn
010 musics
Jul 2, 2002, 12:45 PM
Paul
Veteran
(19537 posts)
Jul 2, 2002, 12:45 PM
Post #2 of 6
Views: 3276
Shortcut
Re: [xpert] category list
In reply to
Code:
my @cats = $DB->table('Category')->select( 'Name' )->fetchall_list;
my $i = 0;
for (@cats) {
print sprintf("%.3d", ++$i) . " $_\n";
}
Last
edited
by:
Paul
: Jul 2, 2002, 12:47 PM
Jul 2, 2002, 1:01 PM
xpert
User
(277 posts)
Jul 2, 2002, 1:01 PM
Post #3 of 6
Views: 3262
Shortcut
Re: [Paul] category list
In reply to
Hi, Paul where should i add thi code, sorry, i'm newbie at Links!
Jul 2, 2002, 1:03 PM
Paul
Veteran
(19537 posts)
Jul 2, 2002, 1:03 PM
Post #4 of 6
Views: 3247
Shortcut
Re: [xpert] category list
In reply to
You can add it as a global by surrounding it with sub { } ....bear in mind you might not want to do it if you have about 50,000 categories :)
Jul 2, 2002, 1:07 PM
xpert
User
(277 posts)
Jul 2, 2002, 1:07 PM
Post #5 of 6
Views: 3226
Shortcut
Re: [Paul] category list
In reply to
Thx Paul, luckily i only have 10 category!
Jul 2, 2002, 1:10 PM
xpert
User
(277 posts)
Jul 2, 2002, 1:10 PM
Post #6 of 6
Views: 3236
Shortcut
Re: [Paul] category list
In reply to
hmm.this worked nciely with static setup but i dun think it will work at all within my php frontend?
Previous Thread
Next Thread
Print Thread
View Threaded