Gossamer Forum
Home : Products : DBMan : Discussions :

Existential (ID) problem

Quote Reply
Existential (ID) problem
I have an existential problem, an ID problem:

This is (part of) my CFG:

ID => [0, 'numer', 11, 11, 1, '', ''],
Username => [1, 'alpha', -2, 8, 0, '', ''],

$db_key_track = 1;
$auth_user_field = 1;

I let every user only add one record, and use the "Send to ADD" mod to check if the person already has a record, if not he will be sent to Add sub else he will be sent to Modify sub.

Everytime a new user signs up, the .pass file saves the user's username, password and the signup email.

When the user saves his first (and only) record, the .DB file would have to start with:

1|username|etcetera...

Instead it has the following values:
username|username|etcetera...

What can I do about that?

Of course the database works great, but I want automatically incremented, numbered ID's.

Grateful for any answers - this must be my final error before we go live.

/CSky


Quote Reply
Re: Existential (ID) problem In reply to
Do you have:

$db_key = 'ID';

in your .cfg file defined for your ID field? This is the only think I can think of.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Existential (ID) problem In reply to
Lois, thanks for answering my post:

Yes, I do have
$db_key = 'ID';
in the CFG, although it was too important to mention, so I forgot all about it! ;-)

Would that $db_key = 'ID'; be a problem?

/Csky
Quote Reply
Re: Existential (ID) problem In reply to
No the $db_key = 'ID'; would not be a problem as it would be necessary to identify the field which is being used for the counter field.

I'm not sure why this wouldn't work other than perhaps not having your .count file chmod 666.


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Existential (ID) problem In reply to
I am sorry to say that this is not the solution.
Thanks Lois, and if you (or somebody else) might come up with a solution in the middle of the night, don't forget to write it down ;-)

CSky


Quote Reply
Re: Existential (ID) problem In reply to
If you dont have auto-generate turned on, double check that for your ID field, you are supplying ID value, rather than the USERNAME value.

ie: <input type="hidden" name="ID" value="$rec{'ID'}">
not: <input type="hidden" name="ID" value="$rec{'Username'}">

Also, I haven't seen this "Send to ADD" mod, but it may or may not have something to do with it...

Just trying to cover all possibilites Smile

Hope you get it working!

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Existential (ID) problem In reply to
Well, thank you, Mark I've tried (and checked) that too.

A hint could be the following:

Everything $rec (dollarrec) works, some of %rec (percentrec) work and some don't.

The my (%rec) = @_; work and the &build_html_record(%rec) works too, but calls like %rec=&get_record($db_userid); do not work!

/CSky