In the past I have stored all generic settings and configuration items such as: custom application title, home address, version, debug, etc.. all in a "settings.php" file that I would include into all of my scripts.
I would assume that it is better practice to have a database table specifically setup for application settings such as these, in that way you dont need to edit a php file to adjust or make changes. Yet I am a bit cautious about how I would set this up.
There are two options I have been considering:
- I have a table with one row, many columns, making each column a unique variable value.
- I have two columns with the first being the variable name, and the second being the variable's value.
Any suggestions or things I should be aware of from a database design perspective?