FastFormField nuAutoNumber: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
The user table allows duplicates unless the schema has other keys / constraints. The AUTO_INCREMENT parameter is not necessary in the schema definition of the user table.
The user table allows duplicates unless the schema has other keys / constraints. The AUTO_INCREMENT parameter is not necessary in the schema definition of the user table.


'''<u>UPDATE 2021-01-16:</u>''' [url=https://github.com/apmuthu/nubuilder4/commit/ece2d0b8a7788a5dd690587df565ddddcf1c124c]v4 Commit[/url] |  
'''<u>UPDATE 2021-01-16:</u>''' [https://github.com/apmuthu/nubuilder4/commit/ece2d0b8a7788a5dd690587df565ddddcf1c124c v4 Commit] |  
[url=https://github.com/apmuthu/nubuilder4/commit/ece2d0b8a7788a5dd690587df565ddddcf1c124c]v4.5 Commit[/url] - [b]nuAutoNumber [/b]has changed from[b] VARCHAR(1000)[/b] to[b] BIGINT(20) UNSIGNED[/b] whilst retaining backwards compatibility.
[https://github.com/apmuthu/nubuilder4/commit/ece2d0b8a7788a5dd690587df565ddddcf1c124c v4.5 Commit] - [b]nuAutoNumber [/b]has changed from[b] VARCHAR(1000)[/b] to[b] BIGINT(20) UNSIGNED[/b] whilst retaining backwards compatibility.


The '''Next Number''' attribute of the '''Input''' parameter can be initialised.
The '''Next Number''' attribute of the '''Input''' parameter can be initialised.

Revision as of 13:07, 16 January 2021

The FstForm field nuAutoNumber is for storing number sequence that can be incremented for each new record. It is by default a VARCHAR(1000) field but should have the last one as a digit that gets incremented.

BIGINT works if manually changed at the table level in a MySQL client like nudb (phpMyAdmin) or SQLyog.

If the code in nubuilders.php is changed to use BIGINT unsigned, the older VARCHAR(1000) still works.

The user table allows duplicates unless the schema has other keys / constraints. The AUTO_INCREMENT parameter is not necessary in the schema definition of the user table.

UPDATE 2021-01-16: v4 Commit | v4.5 Commit - [b]nuAutoNumber [/b]has changed from[b] VARCHAR(1000)[/b] to[b] BIGINT(20) UNSIGNED[/b] whilst retaining backwards compatibility.

The Next Number attribute of the Input parameter can be initialised.

Next nuAutoNumber.png

The Auto Increment is done in the functions nuAutoNumber() and nuUpdateCounter() in nudata.php.