【发布时间】:2020-04-25 10:39:13
【问题描述】:
我尝试使用wpdb->update 更新数据。我正在尝试更新数据 WHERE product_title => $title & WHERE course_id 为空。我可以添加 product_title 但我怎么能 course_id 为空条件。
global $wpdb;
$voucher_codes = str_replace(' ', '', $voucher_code);
$table_name = $wpdb->prefix.'xyz';
$update_data = $wpdb->update(
array('course_id' => $id, ),
array('product_title' => $title) //where
);
【问题讨论】: