I have tried escaping all of the characters and that doesn't work. I need to insert this string specifically. Can anyone tell me what I'm missing? The other 4 insert statements work fine. Below is the full code:
$user_id = mysql_insert_id();
$sql1 = "INSERT INTO `wp_usermeta` VALUES (NULL, $user_id, 'nickname', '$email');
INSERT INTO `wp_usermeta` VALUES (NULL, $user_id, 'rich_editing', 'true');
INSERT INTO `wp_usermeta` VALUES (NULL, $user_id, 'comment_shortcuts', 'false');
INSERT INTO `wp_usermeta` VALUES (NULL, $user_id, 'admin_color', 'fresh');";
$sql1 .= "INSERT INTO `wp_usermeta` VALUES (NULL, $user_id, 'wp_capabilities', 'a:1:{s:10:\"subscriber\";b:1;}');";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql1);
Thanks
UPDATE
The problem lies with the semi-colons in the string. I have tried escaping these in the normal fashion () but that doesn't seem to work here. The string now looks like a:1:{s:10:\"subscriber\"\;b:1\;} Any ideas?