Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Converting/Reordering database

Quote Reply
Converting/Reordering database
Hi all,

I've searched but haven't found an exact solution. I have two databases that I'd like to convert for use with my existing links site. The two databases' fields are in a different order than links is. As an example:

id|name|url|etc|etc
where the others are:
|url|name|etc|etc
and
etc|etc|name|url

How can I reorder these other files to match my existing links db?

I looked at the convert.pl script Alex wrote but it seems that is only for the IndexFinger conversion. Any ideas?

Thanks,
--Train
Quote Reply
Re: Converting/Reordering database In reply to
Hi All,

I guess I can answer my own questions Wink

I found this script (Simple Database Engine):

http://find.virtualave.net/00/database.txt

and it works. Just add some more fields and reorder them for the output, here:

print HTML "$fields[0] - $fields[1] - $fields[2] - $fields[3] <br>";

add to it and reorder it ... like this:

print HTML "$fields[0] - $fields[5] - $fields[2] - $fields[4] - $fields[1] - $fields[6] - $fields[7] - $fields[8] <br>";

mess with that <br> (or search and delete it out) and you'll have it!

I did a search and replace to get it back to pipe delimited.

--Train
Internet Personals Clearing House
http://www.ipch.com/