Search code examples
phpmysqlshort-url

modifying url shortner script


I've been using Johnboy URL shortner and I noticed it doesn't check and see if the URL that it generates exists in the database. How could I ensure that the URL is unique>


Solution

  • Simply adding UNIQUE to the database column url_link should do.