by prettyscripts on 2010-07-14 12:51:00
important: you must have a backup of the database with deleted topic. if not, you might as well skip this post.
instruction here is based on smf v1.1.x and uses phpmyadmin. it's a free browser based mysql administration tool. but if you're a mysql expert or you're using a different database, you can still work out sql and commands.
create a dummy database (make sure it's not the same name as the one used by your production forum!) and restore the backup database.
you need to know the topic id. if not, look for it via smf_messages table. you can look up subject and / or body columns. once found, note ID_TOPIC.
assuming the topic id is 100.
from the backup database, click sql link and run the following sql's (one by one):
Code:
select * from smf_messages where ID_TOPIC = 100 |
Code:
select * from smf_topics where ID_TOPIC = 100 |
for each of the result, click export link from bottom of the result. do not click the export link on top of the page!
you're now at export page. from export box, select sql. uncheck 'save as file'. click go.
you should see various sql statements. just copy the insert statements.
now go to the production database. open sql window. paste the above insert statement.
the topic should be back!
Tags: delete, phpmyadmin, retrieve, smf, topic