如何更新Ultimate Member Addon中的WordPress数据库字段

时间:2018-04-12 16:15:45

标签: database wordpress custom-fields

我想更新数据库中存储在wp-options中的两个自定义字段 - > um_cache_userdata_ *< - * = userid

存储数据的列名为public class Imgpixel { private static final String TAG = "Quicknotes"; public Imgpixel() { } String src="C:\\path_of_image\\img.jpg"; Mat imgRead = Imgcodecs.imread(src, IMREAD_COLOR); int lin = imgRead.rows(); //get the number of rows int col = imgRead.cols(); //get the number of cols List<double[]> pixels=new ArrayList<>();//arraylist to save array rgb below public void cor() { for (int i = 0; i < lin; i++) { for (int j = 0; j < col; j++) { double [] rgb = imgRead.get(i, j); pixels.add(0, rgb); } } } } screenshot 我试过像

这样的东西
option_value

我想在option_values中更改的两个值是msn和test

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;

错误消息:致命错误:未捕获错误:在/home/firemax/public_html/wp-includes/functions.php:5869中调用未定义的方法wpdb :: get_row()

SIDENOTE:我也试过

s:8:"username";s:3:"msn";
s:12:"license_keys";s:4:"test";

将“Array”返回到屏幕

1 个答案:

答案 0 :(得分:0)