Re: Delete

From: Date: Sun, 04 Jun 2006 04:18:27 +0000
Subject: Re: Delete
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237335@lists.php.net to get a copy of this message
On 6/4/06, George Babichev <geoldr@gmail.com> wrote:
Hello everyone! I wrote a blog application, but now for the admin panel, i am trying to add a feature to delete blog posts. It would show the title of the post next to it, and have a delete link which would delete it. How would I do this? I mean if I have multiple blog entry's, how would I delete them without using php my admin?
Presumably, you have an id column in your blog posts table which is the primary key. Then you can just delete posts by doing something like: mysql_query('DELETE FROM posts WHERE id = 2312'); Or if you want to delete multiple in one go mysql_query('DELETE FROM posts WHERE id IN (23,34,12)'); Rabin

« previous php.general (#237335) next »