DEV Community

Discussion on: Do not expose database ids in your URLs

Collapse
 
slav123 profile image
Slawomir Jasinski

There is a much easier way, without need to create aditional fields in DB. It's called Optimus ID transformation and it's based on Knuth's integer hash - generates integer id based on 3 parameters and it's reversible. Sample library for PHP is available here:

Optimus id transformation