The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Question Mysql question - Offset a value?
Hello,
** I posted this on vbulletin.com but now that I found out about this modification site, I guess here is the right place to post... I just purchased a vbulletin licence to convert my phpbb forums to a vbulletin one. Currently, I run 2 boards an English http://www.mythtvtalk.com/forum/ and a German http://de.mythtvtalk.com/forum/ one that share the same user databases, etc. I was pretty happy with this tweak at the time but now, it proves to be very difficult to merge them to create a single vbulletin one... Anyway, I have a phpbb table with the following columns: Code:
topic_id forum_id topic_title topic_poster topic_time topic_views topic_replies topic_status topic_vote topic_type topic_first_post_id topic_last_post_id topic_moved_id Therefore if a record has a topic_id = 34 after the SQL trick it should be replaced by 420. Quote:
Thanks Ludo |
#2
|
||||
|
||||
I have no idea why you would need to do this... You can run multiple imports using ImpEx.
|
#3
|
|||
|
|||
Thanks for answering.
btw, I am currently working in a test environment, I can't afford to mess up with my site and data Strange in the email notification I can see: Quote:
As my several thousands of de/german and www have similar post_id as they were stored in different tables, I need to offset the german ones by the amount of www ones available to avoid having the German ones overriding the www ones. Quote:
In addition, I also need to update the forum_id as the forum_id =4 on www and on de link to different forums (i.e.: general questions in English and General questions in German), if I merge the two tables without any tweaking when importing the posts, they will all be linked to the wrong forum. So I need to create first, new forums with new IDs in the www one and then replace the old german forum_ids with this new one with something like that I guess: "UPDATE tablename SET forum_id = 12 WHERE forum_id = 4" Does it make sense? |
#4
|
|||
|
|||
Running ImpEx first for 1 board, finalise the import, then start with the 2nd import. This should work.
I would not suggest manipulating data unless you are absolutly sure it si the correct way to do this. |
#5
|
|||
|
|||
Erm, ok.
Let me try that now as I'm in a test environment. |
#6
|
||||
|
||||
Yes, I did, because I figured that you were trying to do multiple imports, and this is already supported by ImpEx.
|
#7
|
|||
|
|||
Ok, so I have been playing with the multiple imports and it seems to work.
I have some weird behaviour (i.e.: Some very old post from a user become posted under his name, but not linked to a new account created at a later stage by the import?) but overall it works well. I also have the number of posts and threads that shows correctly in the stats but not the amount of users :? Quote:
|
#8
|
|||
|
|||
Make sure you have updated all counters as described in the ImpEx Manual after the import.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|