[ic] using catalog.cfg to change data output

Ed LaFrance edl@newmediaems.com
Fri, 26 Jan 2001 11:18:19 -0800


At 10:50 AM 1/26/01 -0800, you wrote:

>For instance:
>
>our user database has creditcard information of:
>
>7  = american express
>5  = visa
>3  = mastercard
>
>and so forth.
>
>Is what i want to have displayed is
>
>american express
>visa
>or
>masterccard
>
>in the html output.

To do something like this, I would set up a cc database:

file cc.txt

code    type
7       american express
5       visa
3       mastercard

...and don't forget to configure the db in catalog.cfg.  Then to display 
the name for the code, you can just do this (assuming the code is stored in 
a field called cc_type in userdb)

[loop arg="[value cc_type]"][loop-data cc type][/loop]

-- or --

[data base=cc field=type key="[value cc_type]"]

- Ed L.
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          edl@newmediaems.com
Placerville, CA  95667         http://www.newmediaems.com
(530) 622-9421                 (530) 622-9426 Fax
(866) 519-4680 Toll-Free
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>