Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-16 02:51:03
- Richard2005
- New Member
- Registered: 2005-04-11
- Posts: 8
How do I move comments from one database to another?
Hi,
I accidentally removed my guestbook “post” when working on a new site design.
This post has all the guestbook comments connected to it and suddenly they were all gone.
I do have a backup of the MySQL database, but I can’t load the whole database since there are too many changes in the new one.
Is it possible to “cut out” just the comments to this guestbook post from the database, (from phpMyAdmin maybe?), and then import/add them to the new guestbook post?
Thanks!
Offline
Re: How do I move comments from one database to another?
How/where was your guestbook content saved ?
Inside Textpattern (as comments maybe ?), inside a dedicated table ?
It shoudl be possibel to do it, but we need a little more datas on what was your “guestbook”.
Offline
#3 2006-01-16 11:39:07
- Richard2005
- New Member
- Registered: 2005-04-11
- Posts: 8
Re: How do I move comments from one database to another?
I have a page template containing:
<txp:article_custom form=“gastbok” section=“gastbok” limit=“1”/>
The guestbook text, on top of the entries, is just an article.
The entries are actually regular comments and are saved inside textpattern, along with the other comments I guess.
Thanks for your help!
Offline
Re: How do I move comments from one database to another?
Well ok. That’s not an easy thing then.
From the top of my mind, I would say you need a SELECT query that only select the comments you want (in the comments SQL table there should be a “article_id” field, or something like that). Then, save the comments in a dump format.
Then use that dump to insert them into the new database.
It’s not very hard, but some basic SQL skills would be needed. Or a lot of backup&retry :)
Offline
#5 2006-01-16 15:47:21
- Richard2005
- New Member
- Registered: 2005-04-11
- Posts: 8
Re: How do I move comments from one database to another?
It was easier than I thought…
I just edited the textpattern table and changed the guestbook article ID to the old ID, the comments were still there!
Thanks anyway Jeremie! :)
Offline