Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
–1 vote
287 views
in Q2A Core by
retagged by
How can I delete 16,000 questions from the database at once?
Q2A version: Question2Answer: 1.8.6

1 Answer

+1 vote
by

Write a small PHP script using the qa_post_delete() function:

require_once 'Q2A_INCLUDE_DIR/qa-base.php';
require_once 'Q2A_INCLUDE_DIR/app/posts.php';

$query = 'SELECT postid FROM ^posts WHERE ...';
$id_list = qa_db_read_all_values(qa_db_query_sub($query));
foreach($id_list as $id) {
  qa_post_delete($id);
}

The difficult part is the database query condition to select only the IDs you want deleted.

by
Can you help me with that, I couldn't do it
by
+2
I have no idea what your criteria are for the questions you want to delete, and I already gave you basically the entire PHP code you need. Also, please DO NOT send me PMs about your questions. I'm not your personal support hotline.
...