Custome Sequential Number

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
cimcore_dl
Posts: 1
Joined: 2016-09-24 15:38

Custome Sequential Number

Post by cimcore_dl » 2016-09-24 15:51

I am building a job log and I need the "Job number" to be sequential and I need to start the database numbering at "70600" which is the job number we will use for using this log and throwing out the old way of doing it. How do I get this to wok? Thanks.

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: Custome Sequential Number

Post by peebee » 2016-09-25 23:58

Already built into Appgini.

Set the "Job number" field (lets say it is named "job_number") to be "Auto Increment" in Appgini, then set the initial value for that field in the database to 70600

ALTER TABLE job_number AUTO_INCREMENT=70600;

Here's a reference for altering the value: http://www.mysqltutorial.org/mysql-reset-auto-increment

Post Reply