Hi,
I’m trying to create a business application based on CI. I have a question how can I select a database user/pass depending on the data in session.
For example: I use basic/anonymous access to allow loging in, then I use different user/pass to get data in mysql (securing database)
Another requirement is the “history of changes” in database. I would like to do it via triggers in mysql. I would like to add record to special table with information about the actual user login used in web app. How can I make sure that each user has it’s own connection to db, and that at when the session is established the special mysql session variable is set. Or how can I set such variable before each add,update,delete query? (is this concurrently safe?)
thanks,
cogito