07-20-2011, 02:24 PM
[eluser]thatguy142[/eluser]
Hello,
I have a function that I'm using to generate a table based on a query run against the database. I want to add a link in each row in the "title" column for a user to click on to edit more details related to that row, but the returned table still doesn't get updated.
Is there something obvious that I'm missing here? Thanks.
Hello,
I have a function that I'm using to generate a table based on a query run against the database. I want to add a link in each row in the "title" column for a user to click on to edit more details related to that row, but the returned table still doesn't get updated.
Code:
function create_table($table) {
$this->load->library('Jquery_pagination');
$this->load->library('table');
/*
...
pagination configuration and initialization...
...
*/
$this->db->select('id, due_date, title, company, short_description');
$query = $this->db->get('jobs', $config['per_page'], $this->uri->segment(3));
foreach ($query->result_array() as $row) {
$row['title'] = anchor('jobs/edit/'.$row['id'],$row['title']);
}
return $query->result_array();
}
Is there something obvious that I'm missing here? Thanks.