[PHP] Re: web application development question

2002-04-26 Thread Julio Nobrega Trabalhando

  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

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


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
 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] Re: web application development question

2002-04-26 Thread Michael Kimsal

Erik Price wrote:
 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.



Hello Erik,

This is what our http://www.logicreate.com system does, except we go a 
step further and additionally pull in the variables related to a 
particular module being processed.  There is a config table with module 
name, var name and value, and when you're using the 'forum' module, for 
example, all vars in the config table relating to 'forum' are extracted 
and made available to the forum module code.  There is also a backend 
system to allow administrators to change those variables.  Something 
like 'postsPerPage' in the forum module, for example, can easily be 
changed from 15 to 20, by someone who knows no FTP, no PHP, no HTML, no 
coding of any kind.  Just a web-based 'change this value' screen.

Yeah, subtle plug there :)  but it *does* work - we've been using this 
strategy for over a year and it's a good middle ground giving 
flexibility without having to grant access to code to people who don't 
need it/shouldn't have it.


Michael Kimsal
http://www.logicreate.com
734-480-9961


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php