CodeIgniter Forums
How can I put a checkbox column in the database generated table? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: How can I put a checkbox column in the database generated table? (/showthread.php?tid=19754)



How can I put a checkbox column in the database generated table? - El Forum - 06-17-2009

[eluser]manojchakri[/eluser]
I am generating a table from the results of a database query like this
Code:
$this->load->library('table');
$this->load->database();
$sql='SELECT * FROM users';
$query = $this->db->query("SELECT name,email FROM users");
$tab=$this->table->generate($query);
echo $tab;
Now in the above table I am getting name and email of all users.I need to put a checkbox or radio box column for every row like in a form and post that selected item(s) to another controller for editing the data or deleting the data.How can I do that.Should I get the library function $this->table->generate() source code and edit it to make a new function which will have the new column with checkbox/radio buttons. If so please post any code.If you thought of any other way please suggest one.Thanks in advance.