I have some data data as array in php and i am storing this as serialized in mysql table in a single column. Does this have any potential harm ?
1条回答 默认 最新
- dongxi3859 2011-12-14 07:46关注
You can use "mysql_real_escape_string()" to escape unwanted codes before storing the data in mysql. Also stripslashes() and addslashes() functions are available. These functions escapes special characters in a string so you can store and retrieve the data safely.
Still it may affect the performance to some extent.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报