[eluser]skunkbad[/eluser]
Just wondering what is the best practice for preparing data for serialization, and then what do do when retreiving it from the database. I'm current using addslashes while looping through my array before serialization, and that allows me to properly store the serialized array, but when I look in the database using phpMyAdmin, the backslashes aren't there. When I retreive the data, I have to do a string replace for the single quotes to add slashes to them again. I think CI is stripping the slashes when the data is being inserted.
Because I'm using a complex query for the insert, I'm using question marks as placeholders for the data in the query, and using $this->db->query();
When I retreive the data, if there is double quotes, the serialized data is basically corrupt.
Any ideas?