Jump to content

Recommended Posts

Hi.

 

I am wanting to insert into a DB table a text input that contains html tags (inserted via a text editor).  The input can be up to 4000 chars long. 

 

My problem is I am wanting the text within the html tags to be readable in a site search, but still keep it's html appearance when called by php.  What datatype would be best to use in this case??

 

To keep the inputs appearance I am using wrap="virtual" in the text area input, and calling it from the database using php's nl2br.

 

This is working fine as a BLOB datatype, however as I found out I will not be able to search efficiently a BLOB column.  If I use TEXT as the datatype I find the output of the data when called does not fill the full width of the div I am placing it??

 

Any suggestions here would be greatly appreciated.

 

Thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/191456-datatype-question-for-texthtml/
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.