Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: edi67 - tammikuu 25, 2009, 03:50:19 IP

Otsikko: Directly comand for delete topic inside board in mysql
Kirjoitti: edi67 - tammikuu 25, 2009, 03:50:19 IP
I have this problem:
http://www.simplemachines.org/community/index.php?topic=267778.msg1890759#msg1890759

so i asking if there is one directly comand that i can launch by MYSQL panel for DELETE topic in one specific board, i want empty that board directly by Myphpadmin panel, because i cannot prune Recycle Bin using admin panel in forum.

thx for help
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: Kermit - tammikuu 28, 2009, 06:03:15 AP
Here is our SQL query

DELETE FROM smf_topics WHERE smf_topics.id_board = 'x';

x should be replaced with the board id of the related board,after running this SQL query,you should run Recount all forum totals and statistics option as well
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: edi67 - tammikuu 28, 2009, 07:24:32 AP
Everything work good thx, the only thing that remains is the Number of Posts in description of section , total of Topics are 0 but total of posts inside that specific section are always the same, by the way the section is empty now.
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: Rumbaar - helmikuu 04, 2009, 11:24:24 IP
I'm sure there is a better method to call the delete topic function used by SMF, but I'm not sure what that is.

Try to run the Find and Repair or Recount maintenance to see if that addresses that issue.
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: edi67 - helmikuu 05, 2009, 06:31:26 IP
Lainaus käyttäjältä: Rumbaar - helmikuu 04, 2009, 11:24:24 IP
I'm sure there is a better method to call the delete topic function used by SMF, but I'm not sure what that is.

Try to run the Find and Repair or Recount maintenance to see if that addresses that issue.

i think the same the SMF method is the best but not work for me directly in admin panel i tryed everything but nothing only Duncan comand work for now
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: karlbenson - helmikuu 06, 2009, 08:52:11 AP
Damn, I wish I'd seen this topic earlier.

You shouldn't just run a single query like that.
Topics affect multiple tables.  and you will cause great inaccuracies/bugs or even fatalerrors by running just this query.
(let alone the statistical issues).

You should have used the function removeTopics in Sources/RemoveTopic.php
Otsikko: Re: Directly comand for delete topic inside board in mysql
Kirjoitti: Rumbaar - helmikuu 06, 2009, 05:44:25 IP
That's what I meant when I said 'delete topic function used by SMF'.

But the find and repair errors might be able to fix any orphan post and links now.