On 6/4/06, George Babichev <geoldr@xxxxxxxxx> 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php