CodeIgniter Forums
multiple comment delete - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: multiple comment delete (/showthread.php?tid=22541)



multiple comment delete - El Forum - 09-13-2009

[eluser]benfike[/eluser]
Hi!

I want to make a multiple comments delete with checkbox.

Code:
<input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $comm['id']; ?>">

So, if a admin mark some comment and then click on delete marked comments link, make

$this->db->set('status','inactive');
$this->db->update('hir_kommentek');
this.

What controller or model function need for this?


multiple comment delete - El Forum - 09-13-2009

[eluser]überfuzz[/eluser]
Lets see, so far you've got:
Code:
$this->db->set('status','inactive');
$this->db->update('hir_kommentek');
Out of the blue, are they for setting rows and updating rows..? Why don't you go completely wild and create:
Code:
$this->db->delete($array_with_id_numbers);
If you get the methods working you can use them through out your entire site.