PDA

View Full Version : Webwiz import successful except for post counts



robertm
Mon 17th Oct '05, 3:13pm
I did a test import on localhost of a small backup copy of the database. Impex didn't report any errors and all is fine except the post counts were not filled in, and I know the post counts are in the source database (I peeked at both db's using phpMyadmin to confirm this).

My question is, is it possible, with the sourceuserid still intact, to add the post counts via a custom query, if it's done right after the import? Or is that too complex to be realistic? If it is possible, could someone provide a guess to get me started?

Note: I fully admit I probably have created this problem myself.. I didn't have access to a MSSQL server. So I "cheated" by using MySQL Migration Toolkit to take Webwiz Access .mbd file directly to MySQL format. So probably in some small way the MySQL file created isn't exactly what Impex script expects.

But this is SO close to being perfect.. I'm hoping I don't have to scrap everything and go looking for a temporary hosting co. with MSSQL and MySQL on same server. a) I don't know anything about MSSQL and b) I already have two managed servers, but can't get MSSQL put on either one.

Any suggestions appreciated.

Jerry
Mon 17th Oct '05, 3:53pm
You can either update the users post count using the admincp, though if you want the actual number from the source, it will take a script to select all the userid's from the source and the post counts, then update the target based on importuserid.

robertm
Mon 17th Oct '05, 4:28pm
Thanks for your reply, I'm glad to hear it's possible. Here is my "kiddie code" :)

Select table "author" from database "webwiz_import"
Select table "vb_user" from database "vb3504"
Where "Author_ID" = "importuserid"
Write "No_of_posts" to "posts"

I know that's just junk (I'm certainly no programmer!) Could you suggest the MySQL commands that are needed? I don't mind taking a stab at learning the syntax if required.

I started to get excited when I found your post in this thread but then realized it's not quite the same as my problem:

http://www.vbulletin.com/forum/showthread.php?t=102394&highlight=post+count

robertm
Mon 17th Oct '05, 4:44pm
The other possibility is: might you recognize at a glance what is wrong with the to-be-imported database's schema that is preventing the post counts from being transferred? If yes, I could post that or send a link to the dumped test db.

I'm assuming there is something wrong I could fix in phpMyAdmin.

Jerry
Mon 17th Oct '05, 10:08pm
Can you post your Author table schema, as it looks like its No_of_posts here.

Though the naming is different in several database, the latest for version 4.0 I have is that its Author.posts not Author.No_of_posts.

Either way its line : 164 of impex/systems/webwiz/004.php.

uncomment that and put the correct column name at the end where it currently is : $user_details['posts']); i.e. so $user_details['No_of_posts']); etc.

robertm
Mon 17th Oct '05, 11:33pm
I did another test import and with that line uncommented the post counts were imported correctly.

Thank you very much Jerry!! :)

Jerry
Tue 18th Oct '05, 12:06am
I did another test import and with that line uncommented the post counts were imported correctly.

Thank you very much Jerry!! :)

Was it :

$user_details['posts']);

or

$user_details['No_of_posts']);

robertm
Tue 18th Oct '05, 4:19am
It was "No_of_posts" but it also was Webwiz Access version 7.01, not 7.9.

The developer said the schema hadn't changed after ver 6. I guess I should have looked more carefully. thanks again.