I'm currently using CodeIgniter with MySQL, in my application I'm setting a MySQL variable to limit access to data for certain users within VIEWS, (i.e. SET @UserID = 2; which runs when the user logs in) this is then referenced in my views to ensure data returned is limited (I'm also using Active Record for pass in the ID in queries - I'm keen to have multiple access controls).
The above is working great in testing so far, I was just keen to confirm that this is a suitable approach with CodeIgniter, i.e. each page load with multiple SQL queries across models/controllers will be on a single unshared connection (not with other concurrent users who will set their own UserID)? Given pconnect is disabled I'm assuming this is the case.
Thanks in advance