I am creating an app where I want to assign a unique (XXXX1111) referral code to each registering user in the letter and number format by using firebase. Can some help in personalising the first 4 letters to be specific so that XXXX never changes but the numbers 1111 changes. Request for assistance.
you can keep a count of registered users in a tag starting from like 1111,
when user successfuly signup call that tag and join it’s value with xxxx
and then in firebase store the new value = got value + 1
I don’t understand non-relational databases. Maybe this:
Create 1 elements to have the sequential number, which will be increased by +1. This sequential number, if 0 is needed on the left, create a procedure that does this.
1-Code field = 1 Take it from the non-Relational database, put it in a variable, add + 1 to this code field in the database.
2-Place the left 0 in the variable.(your procedure)
3- Join the XXXXX-
4- Returns and writes to the database.