我想更新数据库中存储在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);
}
}
}
}
我试过像
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”返回到屏幕
答案 0 :(得分:0)
请参阅用户sa_ha_dum的回答here
以下是此问题的参考资料
http://codex.wordpress.org/Function_Reference/get_option http://codex.wordpress.org/Function_Reference/update_option