Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Merge 2 Links SQL DB

Quote Reply
Merge 2 Links SQL DB
I was wondering if anyone knows how to merage to links sql db?

Thanks and all the help is highly appreciated.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] Merge 2 Links SQL DB In reply to
I think you have to do some hand work so I would suggest to chose one database export links and categories and cat links to a flatfile, open it with e.g. Excel, add the amount of the last link-id to links and cat links and do the same with categories. I think you should be fine after manually changing the root categories back to 0. maybe someone else has a better idea.

good luck and always backup ;-)
Quote Reply
Re: [el noe] Merge 2 Links SQL DB In reply to
Your ideas seems like it should work.. however I was wondering how come this feature is not already there within Links SQL.. I mean.. I get tons of work done offline and then I have to merge both the database... however with current features.. it is not possible..

I wonder if some script could be made or this feature would be added within core features of Links SQL.

Vishal Thakkar

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] Merge 2 Links SQL DB In reply to
A Plugin could probably do this. Its really a case of comparing the 2 database, and then inserting the extra links into the current database. The tricky part is getting the CatLinks, Category and a couple of other things to pass the new link ID's. I may write a plugin to do this in a couple of weeks... but at the moment I'm pretty busy with custom work, and my backup plugin.

Sorry

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [el noe] Merge 2 Links SQL DB In reply to
What if below is done.. would this work:

Lets say there are 1000+ categories and about 10,000 listings already within the directory. And the link ID for the latest listing is about 15,800.

Now what if a person is doing all the work of adding more links within a text file and setting up Link ID from 25000 (category ID won't be changing, as the links will be being added within these 1000 categories only, so for each category, he will be using category specific ID number). Once done, this file will be uploaded within the mysql database.

What are the chances for this work.. or would this idea cause problems with links sql database structure. Or other links being added within Need Scripts will be automatically have +1 ID number from where the data entry person has stopped or will be get +1 ID number from 15800 can create problem when it reaches to 25000 ?.

Thanks for the help.

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] Merge 2 Links SQL DB In reply to
There is not even a reason to start at 25000 because the Database will automatically use the auto_increase function. You only have to make sure to add every link in the Links Table and Cat_Links.

Regards

Niko
Quote Reply
Re: [el noe] Merge 2 Links SQL DB In reply to
Well the main reason I was thinking of starting with a different number was..

It will take the data entry person about 60 to 90 days to finish the work and during this time I am expecting lot of listings being added by listing owners using online form. Now if the data entry person were to start from the number 15801 and if people are adding listings using online form then there might be few listings with similar ID, however if I ask data entry person to use LINK ID from certain point, then it is less likely that there will be multiple listings with same ID number.

Any thoughts?

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] Merge 2 Links SQL DB In reply to
Sorry for my mediocre english. What I wanted to say was: There is no need to use any number because the day your new data is added by a Perl routine for example, every Link will get its unique ID by automatically increasing the number of the last Link from the Links table because you have selected auto_increment. You could even do this by adding such a routine to the perl-script. We use this to update our products database for our online-LinksSQL-shop.

Regards

Niko