I have to insert a record in the database according to an integer. For example, 20, 21, 22, 23 ... 29 I get the first number (in case 2) and I enter 2 records. If it is 10, 11, 12, 13 ... 19 (in case 1) I enter 1 record. 0,1,2,3,4 ... 9 I enter none ...
I just need to know if it's from 0 to 9, 10 to 11, 20 to 22, and so on. According to which number I get the first number. The problem of doing for example with substr
is if the number is 100 then it will "think" that it is values between 10 and 19.