Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Import ./. Export with the new version

Quote Reply
Import ./. Export with the new version
Hello Alex!

If I remember correctly, in the last versions one could not simply export categories and links simply as they would turn into IDs and internally tied with database.

I have severe problems with it earlier before I gave up the project. Once the Category or a link is inside the database it became very difficult to get it out without database specific Ids. it was and is for everyone very important to have their correct category names in the links table while export.

How will it be in the Future version? Just curious.

Quote Reply
Re: Import ./. Export with the new version In reply to
All you need to do is do a join on the database, then write the file out. I've done it.

something like:

Code:
SELECT C.Name, L.*
INTO OUTFILE 'my_dump.txt'
FROM Links as L, Category as C
WHERE L.CategoryID=C.ID
I'm sure now that this has been brought up, Alex can have it added to the MySQL man interface "Export Links with Category Names"

This really isn't going to buy too much, since you'll have to have an Import feature that will match the category name to an ID and insert it.

But it would create a links back up that was "free standing" in one file.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Import ./. Export with the new version In reply to
Hello Robert!

Thanks for the hint.

But I did not follow where to insert. May be if I meditate for a while on the script it will be obvious, but I have not had a look at the scripts since the last 8 months and therefore.....

By the way, you have been moding a lot, you must have been in this time. Did you post some of the mods? For instance this could also be a small mod export import with real names.

This things definately helps when one wants to look in Access or any other database. Also for other people it could be helpful. If the database is crashed how will you rebuild? The links have category IDs. If some of the categories have been deleted in between then when you rebuild your link Ids will point to a wrong Id and everything will be a Chaos. I did identify last year but everyone seemd to be in the wave of new moding and this practical difficulty have been missed out. It ofcourse needs to be in the editor.cgi.



Quote Reply
Re: Import ./. Export with the new version In reply to
Just enter it in the SQL monitor. It's not big enough to be a mod, the SQL Engine will do the work.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/