I am building a url shortner application in php and mysql and
i am using the follwing logic to create short urls, pls tell me how is it
First i fetch the last id from the database using
select max(id) from urls
then suppose if it returns 100 then i convert it into base62 number using this function
suppose it returns x31 then short url will be http://somedomain.com/x31
My question is that is this logic works even when large number of people accessing site at the same time or there will be clash in max(id)