Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
8.7k views
in Q2A Core by
Please help i have a clone of my QA.

now i will delete all Questions and answers ?
by
You made a clone of q2a, I suppose you copied the files and the database and now you want to remove all the questions and answers from the copy you made?
by
yes i need a clean q2a script no answers and Questions ^^
by
Why did you copy it? Are you trying to save some data? In general, copying a database is not good practice. Even if you are trying to save something, there are better ways to do it.

2 Answers

0 votes
by
DELETE * FROM qa_posts

You could run that SQL query eg in phpmyadmin, replace "qa" with whatever your table prefix is. (Make sure you delete from the right table!) Then you can run all the scripts in Admin>Stats to clear up everything.

 

Also just to ask, what exactly are you "cloning"? I mean, you can just set up a new Q2A from scratch and copy your themes/plugins over. What else do you need to copy?
by
phpmyadmin "Cleare" qa_posts .. not working
#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`fragen_fragen`.`qa_posts`, CONSTRAINT `qa_posts_ibfk_2` FOREIGN KEY (`parentid`) REFERENCES `qa_posts` (`postid`))
by
and delete :
#1217 - Cannot delete or update a parent row: a foreign key constraint fails
by
You should be able to disable foreign key checks temporarily. I don't know the exact code for that, sorry.
by
hmmm and now ?
+2 votes
by

 

Solution:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE qa_posts
 
by
This does not work. Any other suggestions.
...