Blog

Newest Post
Blog Archives
Blog Categories

Portfolio

3D Models
Banners
Brochures
Business Cards
Custom Programming
Environments
Flash Projects
Game Design
Image Altering
Web Design

About

Resume
Recommendation Letters

Contact

March 19, 2008

Update a mysql database and retain special characters

Filed under: PHP — admin @ 10:33 am

To update a mysql database and retain special characters such as possessiveness, or if you are updating a database where you field contains any special characters you will need to use the “addslashes” function to your mysql statement.

$updateSQL = sprintf("UPDATE db_table SET db_field=%s WHERE db_row='".addslashes($title)."'",
GetSQLValueString($value, "text"));

Leave a Reply

© - Digital Epiphany Designs, Online Portfolio for Web Design, Custom Programming, Grapic Design and Game Design.