Jump to content

Datatype question for text/html


BoarderLine

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

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.