Welcome Guest, Not a member yet? Register   Sign In
how is deleting multiple rows from mysql with checkbox?
#2

[eluser]Frank Rocco[/eluser]
Code:
In View
echo form_checkbox('delete[]',$row->id,true);

Code:
In Controller
$delete = $this->input->post('delete');
for($i=0;$i<count($delete);$i++) {
$this->db->where('id', $delete[$i]);
$this->db->delete('searchlog');
}


Messages In This Thread
how is deleting multiple rows from mysql with checkbox? - by El Forum - 05-24-2011, 11:26 AM
how is deleting multiple rows from mysql with checkbox? - by El Forum - 05-24-2011, 12:02 PM
how is deleting multiple rows from mysql with checkbox? - by El Forum - 05-26-2011, 11:31 AM
how is deleting multiple rows from mysql with checkbox? - by El Forum - 05-26-2011, 12:50 PM
how is deleting multiple rows from mysql with checkbox? - by El Forum - 03-15-2012, 04:59 AM
how is deleting multiple rows from mysql with checkbox? - by El Forum - 03-15-2012, 06:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB