Frequently Asked Questions
Access database connection
Last Updated 5 years ago
DbFace already make a database connection to the current database, you can visit it via $this->db.
Please refer the CodeIgniter document to get full information about making queries.
http://www.codeigniter.com/user_guide/database/index.html
Please refer the CodeIgniter document to get full information about making queries.
http://www.codeigniter.com/user_guide/database/index.html
- Regular Queries
$this->db->query("my-sql-query-statement");
- Generate Query Results
$query = $this->db->query("YOUR QUERY"); foreach ($query->result() as $row) { echo $row->title; echo $row->name; echo $row->body; }