[eluser]skunkbad[/eluser]
[quote author="heaversm" date="1290549593"]Hi - I am grabbing 4 fields from my database and generating a table - Client, Project, Role, and URL. The URL, however, I want to be a hyperlink for the Client column, instead of a column on its own. Currently, my code is this:
Code:
$this->db->select('clients.client, project_list.project, project_list.role, project_list.url');
$this->db->from('clients, project_list');
$where = "clients.id = project_list.client_id";
$this->db->where($where);
$query = $this->db->get();
$this->table->set_heading('Client','Project','Role','URL');
return $this->table->generate($query);
How do I modify it to accomplish that. If it can't be done, how do you manually build a table in CI?[/quote]
You would want to loop through your query results, outputting tr's and td's as needed. TR for each row, TD for each field.