Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.