I usually have an info.inc file that has all these variables that I might need to change. Then include it in the files that use those variables and if I ever need to change one of them I just change it in the include file and it updates everything that way..
Rick Beauty of whatever kind, in its supreme development, invariably excites the sensitive soul to tears. - Edgar Allan Poe > From: Erik Price <[EMAIL PROTECTED]> > Date: Fri, 26 Apr 2002 15:50:08 -0400 > To: [EMAIL PROTECTED] > Subject: [PHP] web application development question > > For those of you who write web applications (in any language), what do > you recommend as the best way to store arbitrary atomic data for the web > application? in other words, data that doesn't really need to be stored > in a relational database, as it does not really relate to anything? > > In the app I am working on (PHP/MySQL), there are several instances of > this. One of them is: > a multiplier of 1.5 is applied to any "materials cost" of posters > ordered through my app. That is, although the "materials cost" to my > employer is, say $0.076 per square inch, 0.114 is the amount that we > charge per square inch (0.076 * 1.5). However, this multiplier could > change at some point in the future, so I am hesitant to leave the number > hard-coded into my page. I would rather have it stored in the database, > where my employer can easily update or change it to another multiplier. > But it seems awkward to create a table that simply maintains the > multiplier: > > mysql> SELECT * FROM material_multiplier; > +------------+ > | multiplier | > +------------+ > | 1.50 | > +------------+ > 1 row in set (0.00 sec) > > I suppose I could store a table with two columns, one being VARNAME the > other being VALUE, and pull this kind of standalone data out of it, but > was curious what other people do when they need to store something like > this. > > > Erik > > > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php