【发布时间】:2018-04-12 16:15:44
【问题描述】:
我想更新数据库中存储在 wp-options -> um_cache_userdata_*
global $wpdb;
$posts = $wpdb->get_row("SELECT ID, license_keys FROM wp_options WHERE option_value = '".um_user('ID')."'");
// Echo the title of the first scheduled post
echo $posts;
我想在 option_values 中更改的两个值是 msn 和 test
s:8:"username";s:3:"msn";
s:12:"license_keys";s:4:"test";
错误消息:致命错误:未捕获错误:调用 /home/firemax/public_html/wp-includes/functions.php:5869 中未定义的方法 wpdb::get_row()
旁注:我也试过了
$posts = $wpdb->get_col( um_user('license_keys') );
将“数组”返回到屏幕
【问题讨论】:
标签: database wordpress custom-fields