2
I have a column in the database named after codigo
, where the formatting is like this:
18000001
Where the 18 means the year we are and the 1 is the code of each result. Knowing that this code can be greater than 1 digit 18000011 and so successively, I need to remove only the final value before reaching zero, example:
1800044 - Preciso pegar só o 44
1800444 - Preciso pegar o 444
1804444 - Preciso pegar o 4444
@Nicholasruschelkrüger if ever tested the code? because the answer friend logic is right!
– novic
@Nicholasruschelkrüger used the intval function precisely for this, as it does the integer conversion zeros are ignored.
– Wictor Chaves
yes, forgive me had not tested the code Ants to comment nonsense, thank you very much friend!
– Nicholas Ruschel Krüger