Permanent variable storage
Hi there, I've got an application where I have several pieces of data that the client needs to be able to maintain using CF. These are things like the email addresses that various form output is sent to, the prices for certain products and a bit of "blurb" for the intro page. My question is what is the usual method for storing these kinds of "static" information? The information needs to be able to be changed, but only fairly infrequently. I can't use application variables because they will time out or be erased when the server restarts. Creating a table with a single row to store a bunch of email address columns seems a bit weird. I thought about using a text file but it's a bit of a pain. Any thoughts? Rob Keniger -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Permanent variable storage
Database, then cache the query for a long time.?? Steve - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 21, 2000 05:57 PM Subject: "Permanent variable" storage Hi there, I've got an application where I have several pieces of data that the client needs to be able to maintain using CF. These are things like the email addresses that various form output is sent to, the prices for certain products and a bit of "blurb" for the intro page. My question is what is the usual method for storing these kinds of "static" information? The information needs to be able to be changed, but only fairly infrequently. I can't use application variables because they will time out or be erased when the server restarts. Creating a table with a single row to store a bunch of email address columns seems a bit weird. I thought about using a text file but it's a bit of a pain. Any thoughts? Rob Keniger -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Permanent variable storage
You may need more than one table. As a matter of fact you need several. For instance, for products you would need a product table. For colors you would need a colors table. Then you would need a table that associates the two by product id and color id called something like prodcolor. So the third table would have three columns prodcolorid, productid and colorid. For the administering of what email addresses go to whom or where you could set up similarly. this is a table for personnel a table for web related jobs and a table that joins them. This way you could have those form email addresses going to more than one person if needed. So far as intro page blubs, you could write a tag to inclose your templates with. eg., cfset title ="My Title" cf_design cfinclude template="mytemplate.cfm" /cf_design cfparam name="caller.title" default="My default title" cfswitch expression="#thistag.executionmode#" cfcase value="start" html head titlecfoutput#caller.title#/cfoutput/title meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" style type="text/css" body { font-family: arial, verdana, helvetica; color: #434343; text-decoration: none; font=11;} td { font-family: arial, verdana, helvetica; color: #434343; text-decoration: none; font=11;} th { font-family: verdana, arial, helvetica; color: #737373; text-decoration: bold; font=11;} a { font-family: verdana, arial, helvetica; color: #330099; text-decoration: underline; cursor: hand; font=11;} a:hover { font-family: verdana, arial, helvetica; color: #DE8C12; text-decoration: underline; cursor: hand; font=11;} p { font-family: arial, verdana, helvetica; color: #434343; text-decoration: none; font=11;} /style /head body bgcolor="#ff" table tr td This is a really cool blurb /td /tr /table /cfcase cfcase value="end" /body /html /cfcase /cfswitch Is this what you were asking? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 21, 2000 5:57 PM Subject: "Permanent variable" storage Hi there, I've got an application where I have several pieces of data that the client needs to be able to maintain using CF. These are things like the email addresses that various form output is sent to, the prices for certain products and a bit of "blurb" for the intro page. My question is what is the usual method for storing these kinds of "static" information? The information needs to be able to be changed, but only fairly infrequently. I can't use application variables because they will time out or be erased when the server restarts. Creating a table with a single row to store a bunch of email address columns seems a bit weird. I thought about using a text file but it's a bit of a pain. Any thoughts? Rob Keniger -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Permanent variable storage
Thanks everyone for the responses. why do you think application scope is a bad idea? even after server restart your application will be intended to reinitialize thru application.cfm... Yes I know, but if the variables need to be changed they must be stored elsewhere in order for application.cfm to be able to initialise with the current values. Just say I have two email addresses, one for contacts and one for registration. If I have an "update email addresses" page that simply does a cfset application.contact_address="[EMAIL PROTECTED]", then this variable will be OK until the server restarts but then it will be erased by whatever the defaults in application.cfm are. Or at least I think that's the way it works. I was thinking I could have a table set up wtih four columns, email_id, contact_address, registration_address and date_created. I could then do an insert when they change the email address and initialise the application with whatever the newest email addresses are. However, I don't need to save the older addresses so the information is redundant. Should I just have a table with one row that just gets updated? I know I can do this but I am just wondering if there is an alternative. Rob Keniger -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Permanent variable storage
Rob, okay, if you need to change this date and if we have only two ways left: file and table, I'd better suggest you to choose a table with the single row: 1. it is easy to work with 2. it is OS independent 3. if you do think it is weird now, you'll have to do this later, cause very possibly you'll have more such data to store stas@ -éÓÈÏÄÎÏÅ ÓÏÏÂÝÅÎÉÅ- ïÔ: [EMAIL PROTECTED] [EMAIL PROTECTED] ëÏÍÕ: [EMAIL PROTECTED] [EMAIL PROTECTED] äÁÔÁ: ÞÅÔ×ÅÒÇ, 22 ÉÀÎÑ 2000 Ç. 6:12 ôÅÍÁ: Re: "Permanent variable" storage Thanks everyone for the responses. why do you think application scope is a bad idea? even after server restart your application will be intended to reinitialize thru application.cfm... Yes I know, but if the variables need to be changed they must be stored elsewhere in order for application.cfm to be able to initialise with the current values. Just say I have two email addresses, one for contacts and one for registration. If I have an "update email addresses" page that simply does a cfset application.contact_address="[EMAIL PROTECTED]", then this variable will be OK until the server restarts but then it will be erased by whatever the defaults in application.cfm are. Or at least I think that's the way it works. I was thinking I could have a table set up wtih four columns, email_id, contact_address, registration_address and date_created. I could then do an insert when they change the email address and initialise the application with whatever the newest email addresses are. However, I don't need to save the older addresses so the information is redundant. Should I just have a table with one row that just gets updated? I know I can do this but I am just wondering if there is an alternative. Rob Keniger --- --- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Permanent variable storage
"to change this datA" i meant... -éÓÈÏÄÎÏÅ ÓÏÏÂÝÅÎÉÅ- ïÔ: Stas Maximov [EMAIL PROTECTED] ëÏÍÕ: [EMAIL PROTECTED] [EMAIL PROTECTED] äÁÔÁ: ÞÅÔ×ÅÒÇ, 22 ÉÀÎÑ 2000 Ç. 6:25 ôÅÍÁ: Re: "Permanent variable" storage Rob, okay, if you need to change this date and if we have only two ways left: file and table, I'd better suggest you to choose a table with the single row: 1. it is easy to work with 2. it is OS independent 3. if you do think it is weird now, you'll have to do this later, cause very possibly you'll have more such data to store stas@ -éÓÈÏÄÎÏÅ ÓÏÏÂÝÅÎÉÅ- ïÔ: [EMAIL PROTECTED] [EMAIL PROTECTED] ëÏÍÕ: [EMAIL PROTECTED] [EMAIL PROTECTED] äÁÔÁ: ÞÅÔ×ÅÒÇ, 22 ÉÀÎÑ 2000 Ç. 6:12 ôÅÍÁ: Re: "Permanent variable" storage Thanks everyone for the responses. why do you think application scope is a bad idea? even after server restart your application will be intended to reinitialize thru application.cfm... Yes I know, but if the variables need to be changed they must be stored elsewhere in order for application.cfm to be able to initialise with the current values. Just say I have two email addresses, one for contacts and one for registration. If I have an "update email addresses" page that simply does a cfset application.contact_address="[EMAIL PROTECTED]", then this variable will be OK until the server restarts but then it will be erased by whatever the defaults in application.cfm are. Or at least I think that's the way it works. I was thinking I could have a table set up wtih four columns, email_id, contact_address, registration_address and date_created. I could then do an insert when they change the email address and initialise the application with whatever the newest email addresses are. However, I don't need to save the older addresses so the information is redundant. Should I just have a table with one row that just gets updated? I know I can do this but I am just wondering if there is an alternative. Rob Keniger -- - --- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. --- --- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.