I am saving to the database from cakephp to mysql. When I view the data with phpmyadmin, "driver's" is saved as `”driver’s”. Is there a way to save these entries as normal escape characters? I thought cake would take care of these before they even got to the database. Also, If I do have to keep them this way, how do I unescape them when I pull them back out of the database?
CREATE TABLE IF NOT EXISTS `tablename` (
`id` int(11) unsigned NOT NULL auto_increment,
`start` int(20) NOT NULL,
`stop` int(20) NOT NULL,
`completed` int(1) unsigned NOT NULL,
`score` varchar(10) default NULL,
`fc_module_id` int(11) unsigned NOT NULL,
`fc_section_id` int(11) unsigned NOT NULL,
`user_id` int(11) unsigned NOT NULL,
`selections` text character set latin1 collate latin1_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1035 ;
the “selections” column is the one that is giving me trouble. It wasn’t always set to latin1_bin that is just the latest charset that I tried after I tried utf8_bin. But really I was just making guesses at the charset.
Uncomment the
setting for your database in
app/config/database.php.