Use the replace statement. When you save it to the database. Then you can use SQL to retrieve it.

PHP Code:
 strings Replace(Exp,"'","''"
THat is Replace(Exp,','') Double single quoates " ' ".