mysqlmysql-5.0

What is the best way to store a URL value using MySQL?


I was thinking of storing URL values in my database but I know some URL's sometimes get ridiculously long. I think my MySQL Database is Version 5.0.

I was thinking of using.

VARCHAR(255) 

but this will only work for so long. So should I use.

TEXT 

Solution

  • The maximum length of a VARCHAR in MySQL 5.0 is 65536, so you're not limited to 255.