• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect to database with different credential for different user?

  First I'm beginner for CodeIgniter. Iam trying codeigniter for a new project.

In my site, there are three level of user.  Each user level have access to the certain tables in the database. If I use CodeIgniter for my project, How to connect with different Database credential when a user logged in?

If i would be in a similar situation i would use the default db connection for administrative tasks (get global settings, user profile).

Then i would use a the user specific db connection to access other functions. Check the "Connecting to Multiple Databases" and "Manually Connecting to a Database" section in the guide.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.