[thelist] CF Question: Permutation of right(string, count)
Oliver Lineham
oliver at lineham.co.nz
Mon Jan 8 19:23:26 CST 2001
At 15:23 8/01/2001 -0600, you wrote:
></ml>
cripes, everyone's doing it these days. ;)
<tip>
On a db-backed site you'll find there's a bunch of settings you'll want the
administrator to be able to set (for example, the "From" name to put on
emails generated by the website).
One way of handling this is with a db table called something like
"settings". This one table will hold all site settings. It's just three
columns: settingid, settingkey, settingvalue. (The settingkey should be
indexed, and unique - in fact, you could make it the primary key and do
away with settingid)
The admin interface simply modifies these records.
I suggest you either cache the query, or store the data in application
variables. For example, in Cold Fusion your application initialiser might
retrieve all the settings records, and loop through each one copying it to
an application.settings structure.
</tip>
</ol>
np: cowboy junkies - sweet jane
____________________________________________________
phone +64 21 210-7845 http://www.vibe.co.nz/
po box 10-492 wellington, new zealand
More information about the thelist
mailing list