0

i try to update in a table of wordpress. but i camt't. what is wrong?

The code I am using for this is the following code:

$wpdb->update( $wpdb->membership, array( 'status' => "token", 'transaction_id' => $resid ), array( "code", $code) );
Zilan
  • 1

1 Answers1

0

i use this method and worked!

$wpdb->query("UPDATE $wpdb->membership SET status = 'token' ,transaction_id = '" . $resid . "' WHERE code = '" . $code . "' LIMIT 1");
Zilan
  • 1
  • [**Please, don't use `mysql_*` functions in new code**](http://stackoverflow.com/q/12859942). They are no longer maintained [and are officially deprecated](https://wiki.php.net/rfc/mysql_deprecation). – Gottlieb Notschnabel Oct 03 '14 at 21:31