So i’m selecting some data by username from my url, but my problem is that my usernames isn’t unique so if there is same usernames it creates me errors, nu my url looks like this:
http://adress.com/user/messages/bob
So in this case i would select data where username is bob, but if there is two bob users i would get errors, so i what i would like to do is select data by user id, but then i would have to replace username with id, like this:
http://adress.com/user/messages/321
So my question is how can i keep username insted of numbers but select data by id?
Btw, i’m using php and mysql
It sounds like you’re doing this for vanity URL’s, so keep the username, but also use the ID field… i.e.