The code below is contained in a plugin file. It just seeks to execute an update query against the wp database. However, its generating a fatal error.
Fatal error: Cannot redeclare ce3_cleanup()
Do I need to load a config file to get acess to $wpdb->query?
function ce3_cleanup()
{
$wpdb->query("update wp_postmeta set meta_key=replace(meta_key,'cb2_customHeader','_cb2_customHeader') where meta_key like 'cb2_customHeader'");
$wpdb->query("update wp_postmeta set meta_key=replace(meta_key,'cb2_customTitle','_cb2_customTitle') where meta_key like 'cb2_customTitle'");
}
register_activation_hook(__FILE__, 'ce3_cleanup');
?>
The recommended way to write that function would be:
No,
Cannot redeclare...
means that you already have a function namedce3_cleanup()
somewhere else on your site. Perhaps in another plug-in or in your theme.