0

i have this question about mysql data in a table... how can i insert an html text with tags, text, etc in a mysql table? What datatype do i need to store something like that and what do i need to encode or whatever i need to perform the insert? I'm using c# 4.0 and mysql connector 6.3.6

Thanks!

1

1 Answer 1

0

Use the TINYTEXT, TEXT, MEDIUMTEXT or LONGTEXT datatypes depending on how much data you are expecting.

If you are dealing with UTF-8 encoded html make sure that your collation matches that.

1
  • That works for me, thanks! I use to the HttpUtility.HtmlAttributeEncode for passing the html data
    – Phoenix_uy
    Jun 8, 2011 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.