0

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 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah i do use mysql_real_escape_string always. I feel its better then storing these records in multiple rows in another table to storing all in single column in same table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.