Global Variables from Database
Posted: Fri Apr 21, 2006 4:25 pm
Hi All
I would like to store all my global site variables in the database. I've created all the structure, and filled the data directly to the table, but i was wondering the best way to allow all these variables to be available to the application for all users. Would it be easiest to get all users to query the variables each time they move from page to page?
Or query them once, store them as global vars, and only update them when they change? (how would i do this?)
also if i did the above, how would i get them to load initially, say is the server was rebooted, can i have like a main() function in php which loads when the first visitor visits?
Thanks
I would like to store all my global site variables in the database. I've created all the structure, and filled the data directly to the table, but i was wondering the best way to allow all these variables to be available to the application for all users. Would it be easiest to get all users to query the variables each time they move from page to page?
Or query them once, store them as global vars, and only update them when they change? (how would i do this?)
also if i did the above, how would i get them to load initially, say is the server was rebooted, can i have like a main() function in php which loads when the first visitor visits?
Thanks