Reputation: 7906
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 ?
Upvotes: 0
Views: 150
Reputation: 5798
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.
Upvotes: 2