UPDATE
$option_tree_value_mysql = 's:5:"title";s:9:"post";s:4:"page";';
$table_name = 'wp_options';
$option_id =100;
$sql = "UPDATE $table_name SET option_value='$option_tree_value_mysql' WHERE option_id=$option_id";
$ereminders = $wpdb->query($wpdb->prepare($sql));
/* 參數測試 */
$wp_user_id =2;
$wp_post_id =1;
$user_blogs_array = get_blogs_of_user( $wp_user_id ); //Notice: 開啓debug模式有 wordpress 3.1前棄用的訊息
foreach ($user_blogs_array AS $user_blog) {
$wp_blog_id = $user_blog->userblog_id;
}
$table_name = 'wp_'.$wp_blog_id.'_postmeta';//'wp_2_options';
$sql = "UPDATE $table_name SET meta_value=%d WHERE meta_key='條件' AND post_id='1'";
$ereminders = $wpdb->query($wpdb->prepare($sql,3));
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。