Problem with unique ID

J

Jacob

Guest
Hi there,

I was just wondering if anyone might have any insights into my problem, I suspect I'm missing something very obvious but keep hitting the wall of my own ignorance on this one. I have a Innodb table with an ID field set to auto_increment. In Dadabik the field is configured with the unique_id option. However, for some reason, the ids being entered automatically seem to be jumping around rather dramatically, even entering integers far longer than the length of 3 I've specified in the database. Any clues?

Thanks in anticpation,

Jacob
 
D

Debbie Sontag

Guest
Jacob

Your ID field settings in DaDaBIK should be field type "text" with the field settings in MySQL set to "PRIMARY" and "auto_increment". This will ensure that the ID field increments by one (1) each time a new record is added.

Per the documentation for DaDaBIK, the unique_id field is for:

unique_ID: a unique ID generated by using the PHP function unique_ID() in conjunction with microtime(), getmypid() and md5() will be automatically inserted in this field when you insert a new record in your table; you should not include a unique_ID field in the insert/update form, see below for understand how to include/exclude a field from a form

Hope this helps.

Debbie

(Latest version of DaDaBIK when this message was posted: 3.0)
 
Top