In my codeIgniter project I have separate tables to each user. like, tbl_user1, tbl_user2, tbl_user3, tbl_user4, etc. this 1,2,3,4 are user id numbers.
after particular user logged in to the system, i need to access table which is related to user. (ex. for user 2, need to fetch data from tbl_user2 table).
I have session variable containing user id,
$uid=$this->session->userdata('uid'); //$uid=2 for **user 2**
how to use this with my model and controller,
ex. controller
$this->tbl_user('username'); //$this->tbl_user.$uid('username'); - not working
ex. model
$this->db->select('tbl_user.$uid.*', false); - //not working
$this->db->from('tbl_user.$uid'); - //not working
please advice.