[thelist] bbCode or HTML in DB?

Joshua Olson joshua at waetech.com
Thu Oct 13 09:23:35 CDT 2005

> -----Original Message-----
> From: Brooking, John
> Sent: Thursday, October 13, 2005 10:07 AM
> Hello,
> Here's a best practices question that I would love to hear 
> some input on. I have started building some database-driven 
> websites that allow basic formatting via "bbCode". I've just 
> realized that I haven't really thought through the following 
> design decision: Should I translate the bbCode to HTML 
> *before* storing it in the DB, so that the HTML tags are
> stored in the DB, or should I store the bbCode in the DB 
> and translate it to HTML after retrieval?


I'd recommend that you render the bbCode to HTML when you save it to the
database... but, save the bbCode to the database as well!  When you display
the information on the front of the site, display the HTML version.  If you
ever need to edit it again, work with the bbCode version.

Joshua L. Olson
WAE Tech Inc.
Phone: 706.210.0168 
Fax: 413.812.4864

Monitor bandwidth usage on IIS6 in real-time:

More information about the thelist mailing list