Is there a easy way to implement sequential numbering for records?
What I need is:
on a table i have a string field, let's say seqId
and in every form I would like to initialise the field with the next number in in the sequence, but as the same time format it like INV-000001, INV-000002 etc.
yes, but the $nr is the one that I need, not the formatting :)
in good old ADO PHP, there was a GenId()
/**
* Generates a sequence id and stores it in $this->genID;
* GenID is only available if $this->hasGenID = true;
*
* @param seqname name of sequence to use
* @param startID if sequence does not exist, start at this ID
* @return 0 if not supported, otherwise a sequence id
*/