Jump to content

Unlimited Varchar


matvespa

Recommended Posts

I need to have a unlimited varchar. Anyone knows how i can get this done.

 

I have a VERY LONG text and having varchar as the structure require me to limit my text. However, when i put it as TEXT, there is an issue with this sign: ( ' ).

 

This is because, when i try putting ' like in Human's there is an error in TEXT. However, it works fine in VARCHAR but there's limitation. How can i achieve this?

Link to comment
https://forums.phpfreaks.com/topic/212517-unlimited-varchar/
Share on other sites

You should be escaping data before it goes into a database, using mysql_real_escape_string, so that characters such as a single quote are escaped. If you have very long text then you should be using TEXT as your column type, not VARCHAR. Just ensure you escape any data before inserting it.

Link to comment
https://forums.phpfreaks.com/topic/212517-unlimited-varchar/#findComment-1107206
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.