site wide variables
Posted: Wed Apr 02, 2003 8:51 pm
I am starting a new project and I want to store all variables (site name, colors,etc) in the database. I have done this before and it works great.
My question is what is the best way to get the variables out of the db.
I can think of a few ways.
1) use defines to and loop through all of the variables in the db.
2)use variable variables and loop through all values in db.
3) use a function like get_variables and call that every time a variable is needed.
Which method is best , to a)keep the script fast and b)minimize impact on db server.
Thanks
My question is what is the best way to get the variables out of the db.
I can think of a few ways.
1) use defines to and loop through all of the variables in the db.
2)use variable variables and loop through all values in db.
3) use a function like get_variables and call that every time a variable is needed.
Which method is best , to a)keep the script fast and b)minimize impact on db server.
Thanks