Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Date ID Problem

Quote Reply
Date ID Problem
I need help determining why Links 2.0 is using the date when a link is added for the ID number as opposed to the ID number I assign. When I try to modify or edit the existing links (I just tried this program out this week so there are only a handful) I get an error message saying that the ID number does not exist. If I leave the date in the ID field I get an error message that says that the ID field is limited to 8 characters.

I did a little hacking to the script, but only minor changes, nothing major. Please help me to determine the problem. Thanks.

Quote Reply
Re: Date ID Problem In reply to
Why do you want to use the Date field as the primary key (db_key) of your links database? That would not make good sense in terms of duplicate records. The purpose of the ID is to keep records unique in the database and reduce the risk of duplicate records.

Regards,

Eliot Lee

Quote Reply
Re: Date ID Problem In reply to
I think you have misunderstood. The program is automatically overriding my unique ID numbers and is filling in the ID number category with the date of entry. This happens behind the scenes and not by my choice. I need insight into the possible problem that is causing this. When I try to access a link (for modification or whatever) the date appears in the ID field instead of the unique ID I gave it.

I hope this clarifies for you.

Quote Reply
Re: Date ID Problem In reply to
1) Did you add a field in the links.def file without updating the links.db? If so, then your database is corrupted and you need to update your links.db file, which can be accomplished by adding delimiter character that you are using like | at the end of each record in your links.db file OR search the Links 2.0 forums for Bobsie upgrade and you will find a script that will automatically upgrade your database.

2) What other modifications have you made to your database recently?

Regards,

Eliot Lee

Quote Reply
Re: Date ID Problem In reply to
Elliot,
Thanks for the help. I did modify links.def (and 4 other files) and added two fields similar to the what's cool fields to create a "site of the week" award and a "site of the year" award. I figured that the links database would be created with the new modifications since I made these changes before implementing the program. However, I will check that this morning and see what the deal is. Thanks for your insights.

Other than this I really haven't changed the program. My bosses wanted me to evaluate the program and see if it was adaptable, and if so, they would buy the sql version. I am more of a OO programmer than a Perl programmer, but, I do know enough to be dangerous [mostly to myself :) ].

Thanks again for your help.

Quote Reply
Re: Date ID Problem In reply to
Well, then you need to update your database...flat file databases do not automatically update themselves with new fields added in definition/configuration files. You need to add the extra columns in the links.db for the fields you added in the links.def file.

Regards,

Eliot Lee