Ok great, I am running the following query, but it doesn’t update any rows:
update settings set value =
case array_key
when 'email_type' then 'SMTP'
when 'email_host' then ''
when 'email_port' then ''
when 'email_username' then ''
when 'email_password' then '' end
where array_key in ('email_type','email_host','email_port','email_username','email_password')
Here is my current table dump:
CREATE TABLE `settings` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`array_key` varchar(100) NOT NULL,
`value` varchar(100) DEFAULT NULL,
`category` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` VALUES(1, 'admin_session_name', 'jbs_admin', 'general');
INSERT INTO `settings` VALUES(2, 'language', '/includes/languages/en/default.php', 'general');
INSERT INTO `settings` VALUES(3, 'admin_cookie_name', 'jbs_admin_cookie', 'general');
INSERT INTO `settings` VALUES(4, 'max_featured_advertisers', '5', '');
INSERT INTO `settings` VALUES(5, 'max_job_of_week', '2', '');
INSERT INTO `settings` VALUES(6, 'email_type', 'SMTP', 'email');
INSERT INTO `settings` VALUES(7, 'smtp_host', NULL, 'email');
INSERT INTO `settings` VALUES(8, 'smtp_port', NULL, 'email');
INSERT INTO `settings` VALUES(9, 'smtp_username', NULL, 'email');
INSERT INTO `settings` VALUES(10, 'smtp_password', NULL, 'email');