Welcome Guest, Not a member yet? Register   Sign In
How to establish blog post id and delete?
#2

[eluser]OES[/eluser]
Ok this obviously is a simple example but it will help get you going.

You are going to need to pass the ID of the post you want deleting so this is a basic example to delete that post.

Code:
function delete_post($id)
    {
        $this->db->where('id', $id);
        $this->db->delete('mytable');
        redirect('blog');
    }

Like i said simple but I hope it helps.

It does show this in the manual.

http://ellislab.com/codeigniter/user-gui...tml#delete

Good luck and welcome to CI


Messages In This Thread
How to establish blog post id and delete? - by El Forum - 01-27-2009, 04:35 PM
How to establish blog post id and delete? - by El Forum - 01-27-2009, 05:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB