Gossamer Forum
Home : Products : DBMan : Installation :

Can't Get The $db_key_track to work?

Quote Reply
Can't Get The $db_key_track to work?
I've been working with DBMan for the past week and a half. I have most of it configured, and working well, but I want to config it so that when you add a new entry, it will assign the next available ID to it. I believe this is done with the &db_key_track variable in the cfg file, but when I add an entry after enabling it, and look at the database, it added the entry, with a blank ID.. Can anyone help me on this one?
Quote Reply
Re: Can't Get The $db_key_track to work? In reply to
Things to check for:

you have a file called default.count in your directory and it has 666 (rw-rw-rw) set

you have defined the name of the file in your .cfg file --
$db_id_file_name = $db_script_path . "/default.count";

you have the $db_key fieldname set to a field that matches exactly the name of a field in your field definitions.

If you have all of those things set, there's more things to look at, but these are the basics.


------------------
JPD





Quote Reply
Re: Can't Get The $db_key_track to work? In reply to
Okay, my file name is mnhealth.count, set at 666.

<snip from mnhealth.cfg>
$db_id_file_name = $db_script_path . "/mnhealth.count";

$db_key = 'ID';
<snip>

All of these are set. So what else could be the prob? Also, when I manually put a number to start at in there, and then add a record, it will delete the number I just stuck into mnhealth.count, and set the file size equal to '0', having nothing in the file.
Quote Reply
Re: Can't Get The $db_key_track to work? In reply to
That was my problem, I jsut had to start out the number, by adding a record and sticking in the id number, so as, it knew where to start counting..

Thanks for your help though

Chris
a.K.a Neophrene