@arnoldo.moen
To get all the rows from a MySQL table in CodeIgniter, you can follow these steps:
1
|
$this->load->database(); |
1 2 |
$query = $this->db->get('table_name'); $result = $query->result(); |
1 2 3 4 |
foreach ($result as $row) { // Access data from the row echo $row->column_name; } |
Note: Replace 'table_name'
with the actual name of your MySQL table.
That's it! You have now retrieved all the rows from your MySQL table in CodeIgniter.