Use of a negative integer as a primary key to edit/view a record in a form

rpalacpac

New Member
I use random integer values that range from -999999 to 999999 as primary keys (pks) in my Fabrik lists. This was based on an earlier database design using MS Access. Whenever I edit/view a list item/record that contains a positive pk, I can edit/view it in a form with no problem. But when I edit/view a list item/record with a negative pk, I get the error "We are unable to find this record".

I have looked into the models\form.php code but it is quite complicated. Is there a way for Fabrik to use a negative primary key to edit/view a record in a form?
 
using negative numbers in the keys wont be possible as we use -1 and -2 to represent 'special' situations.
The only solution I can think of would be to run some SQL to update the keys and and foreign key references by add 999999 to all the values
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top