I let them in a database and a nice administration page so people can
change. There are a lot of more information that you can store, such as last
time of change, and previous values (so peopel can "rollback" them), who
changed, description of the value, related to other values, and there always
someones inspired by your app, such as especific to a client, to a part of
the webiste, to users, merchants (or vendors), etc....
Um dia eu chego lá:
Ajudei? Salvei? Que tal um presentinho?
"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
> 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
> 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