2021-07-17, 06:00 PM
Pages: 1 2
2021-07-17, 06:33 PM
hi
DELETE FROM `mybb_posts` WHERE `visible` = '-1'
2021-07-18, 05:17 PM
(2021-07-17, 06:33 PM)Mostafa.Shiraali Wrote: [ -> ]hi
DELETE FROM `mybb_posts` WHERE `visible` = '-1'
thank you but it didnot work for me, any help please?
https://i.imgur.com/wUx1FYg.png
however if i try to visit the thread i get error "specific thread is not available"
2021-07-18, 05:42 PM
Numeric field:
DELETE FROM mybb_posts WHERE visible=-1
2021-07-18, 05:49 PM
it's same, may be cache issue? thread is not available for restore. only in section it's showing. board statistics also showing correct.
https://i.imgur.com/JNhe63b.png
https://i.imgur.com/JNhe63b.png
2021-07-18, 10:14 PM
Ok, so this is not posts but threads.
You can delete unapproved (and/or soft deleted) threads using
You can also delete threads where first post have been deleted using
As alway, think to backup your database before using these queries
You can delete unapproved (and/or soft deleted) threads using
delete from mybb_threads where visible=-1
.You can also delete threads where first post have been deleted using
delete from mybb_threads where not exists (select null from mybb_posts p where p.pid=firstpost)
As alway, think to backup your database before using these queries
2021-07-22, 11:05 PM
delete from mybb_threads where visible=-1
it's working fine, but the thread sql still staying in phpmyadminhttps://i.imgur.com/eY4jIDX.png
2021-07-23, 06:01 AM
This is the mybb_posts table, it's normal that the previous query doesn't affect it.
So, do
So, do
delete from mybb_posts where visible=-1
to remove the posts.2021-07-23, 08:02 AM
thank you worked fine. however there is an another issue.
there is a thread and reply in that thread. i made soft delete thread. run your sql command thread is deleted but the reply post is still in sql database. is there anyway we can delete those as well?
many many thanks for helping me out.
is there anyway we can auto remove soft delete thread+post after X days?
there is a thread and reply in that thread. i made soft delete thread. run your sql command thread is deleted but the reply post is still in sql database. is there anyway we can delete those as well?
many many thanks for helping me out.
is there anyway we can auto remove soft delete thread+post after X days?
2021-07-23, 08:50 AM
You can use Purge soft deleted posts and threads
If you want to purge soft deleted threads, you must use a more complex query:
Think to save your database before applying this query, I didn't verify it
If you want to purge soft deleted threads, you must use a more complex query:
delete t, p from mybb_threads t left join mybb_posts p on p.tid=t.tid where t.visible=-1
Think to save your database before applying this query, I didn't verify it
Pages: 1 2