mysql type varchar versus text and blob -


i have form has text area in it. user types comment , gets inserted database. problem arises when comment has apostrophe in it...when go retrieve comment , display on screen apostrophe doesn't show up, , seems transformed weird character. need choose mysql data type (varchar, text, blob) avoid this?

the easiest way fix problem can encode data before store them database, after encoding, there no special character, , when retrieve it, can decode, such urlencode ,urldecode.

hope helps!


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -