CodeIgniter Forums
db connection - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: db connection (/thread-31268.html)



db connection - El Forum - 06-12-2010

[eluser]hamzakhan[/eluser]
i need db connection variable or id in my model.
to use in particular query. plz tell me how i can get it.
thanks for any help


db connection - El Forum - 06-12-2010

[eluser]WanWizard[/eluser]
What do you mean by 'db connection variable'? The resource? Try $this->db->conn_id.


db connection - El Forum - 06-12-2010

[eluser]hamzakhan[/eluser]
$this->db->conn_id THIS IS WHAT I need.
actually i am trying to connection id like
$this->conn_id
but forgot to use db
now get it
$this->db->conn_id
thanks