Hi folks,
do you know this feeling... when your past keeps haunting you like a ghost?
I want do delete some old posts, identified by their post number. Is there a way to do this automatically?
I know how to use Unix commands and the cmd line mysql client, if that should be needed. Feel free to post nerdy answers.
Thanks for your assistance and thanks to all of you making s9y available. Great software.
DrNI
Batch-deleting Posts
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Batch-deleting Posts
Hi!
If you want ot do that, the best way would be to use SQL directly:
DELETE FROM serendipity_entries WHERE id IN (4,8,15,16,23,42)
This leaves some corpses of data in the database, but that should not really be relevant.
Of course, the cleaner way would be a script like:
HTH,
Garvin
If you want ot do that, the best way would be to use SQL directly:
DELETE FROM serendipity_entries WHERE id IN (4,8,15,16,23,42)
This leaves some corpses of data in the database, but that should not really be relevant.
Of course, the cleaner way would be a script like:
Code: Select all
<?php
include 'serendipity_config.inc.php';
serendipity_deleteEntry(4);
serendipity_deleteEntry(8);
serendipity_deleteEntry(15);
...
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Batch-deleting Posts
Hi Garvin et al,
it's deletion day again, but somehow this doesn't work any more:
Nothing happens, the log remains silent, except for a nice 200 OK line in the access log.
Are there changes to the s9y code that make this solution not work?
Thanks for your help
DrNI
it's deletion day again, but somehow this doesn't work any more:
Code: Select all
<?php
include 'serendipity_config.inc.php';
serendipity_deleteEntry(4);
serendipity_deleteEntry(8);
serendipity_deleteEntry(15);
...
Are there changes to the s9y code that make this solution not work?
Thanks for your help
DrNI
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Batch-deleting Posts
Hi!
Which s9y version? Also, are you logged in before you call the PHP script? It needs authentication.
Regards,
GArvin
Which s9y version? Also, are you logged in before you call the PHP script? It needs authentication.
Regards,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Batch-deleting Posts
Hi Garvin,
DrNI
I could have guessed that. Did it again after login and of course it worked. Thanks for your help.garvinhicking wrote: Which s9y version? Also, are you logged in before you call the PHP script? It needs authentication.
DrNI