Adam
Adam

Reputation: 9049

I can't add html rich text to mySQL database from Flex

So I want to store richtext in my database created from Flex 3's rich text editor, but I am unable to.

for example this would need to be placed into the database:

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">sdfsdfdsfsdfdsf</FONT></P></TEXTFORMAT>

Is it because of all the special characters?

Is it common practice to store formatted text in a database?

Thanks

Upvotes: 0

Views: 372

Answers (1)

Mchl
Mchl

Reputation: 62387

You need to escape such strings before putting them into a query. Alternatively use prepared statements.

Yes, it is a common practice.

Upvotes: 1

Related Questions