• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing text and smilies

 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a Discussion forum in which I have to store message contains both text and smilies in database.What data type should I use to store smilies and text in Database?
I have to provide search fecility also based on content in text. So which datatype is better? Can I use CLOB? If I use BOLB will it effect my search fecility?
Thanks,
Murali
[ November 04, 2003: Message edited by: Murali Mohan ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, your database should have some datatype like TEXT that you should use. At least, that is what it is called in MySQL. Why would you want to store text as a binary object in a BLOB datatype? There would be no need.
As far as your smilies go, your database isn't storing the smilies. At least not on any boards I have been on. I have disabled smilies in this post to show you what smilies look like in the database.
;)
Your board software will basically have a little engine or parser that your text runs through when pulled from the database before it is displayed on screen. Those little character combinations above will then be mapped and rendered to a GIF or some sort of image. So just store the text in the Database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic