Jump to content

digital function


Recommended Posts

I need to write a function.

That would work just like with a standard id in internal.db

I mean There is a window with a button and label

And when the button is pressed in the label appears figure "0001" when you press the second time "0002" and so on up to 9999

When the number 9999 arrives, the countdown begins anew 0001

And all this should be saved.

Can you help me?

Link to comment
  • Moderators
9 minutes ago, slapz0r said:

It will be used in db.

I need to understand how to generate id this way(in the first post)

 

This is column specification for auto increment ID's when new items are added.

ID int NOT NULL AUTO_INCREMENT

This does not reset, as DB ID are not suppose to be reset. That is asking for trouble

 

So make sure you understand your own question very well!

 

 

Link to comment
1 minute ago, IIYAMA said:

 

This is column specification for auto increment ID's when new items are added.


ID int NOT NULL AUTO_INCREMENT

This does not reset, as DB ID are not suppose to be reset. That is asking for trouble

 

So make sure you understand your own question very well!

 

 

And should not be reset. All right. It is necessary to make generation like that:

0001, 0002, 0003 and so on until 9999

These numbers will get the prefix "A"

A 0001 A 0002 

New numbers after 9999 will be 0001 0002 0003 and so on until 9999

but with new prefix "B"

B 0001 B 0002

Something like that I would like to do

Link to comment
  • Moderators
2 minutes ago, slapz0r said:

And should not be reset. All right. It is necessary to make generation like that:

0001, 0002, 0003 and so on until 9999

These numbers will get the prefix "A"

A 0001 A 0002 

New numbers after 9999 will be 0001 0002 0003 and so on until 9999

but with new prefix "B"

B 0001 B 0002

Something like that I would like to do

The 0's is something you should do with Lua.

id's are counting up: 1, 2, 3, 4, 5 etc.

Those prefixes should also be done by Lua.

Link to comment
2 minutes ago, IIYAMA said:

The 0's is something you should do with Lua.

id's are counting up: 1, 2, 3, 4, 5 etc.

Those prefixes should also be done by Lua.

In this topic, I would like to understand how I can create an id generation in this way.

I understand that this is about creating a new custom id.

Link to comment
  • Moderators
10 hours ago, slapz0r said:

In this topic, I would like to understand how I can create an id generation in this way.

I understand that this is about creating a new custom id.

You got your answer on my second post. Now give it a try.

Configure the column `id` and insert an item.

 

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...