wordpress wpdb->update not working

I can’t update with wpdb->update

here is my code :

Read More
$tweet = $_POST['tweet'];
$id = $_POST['id'];
$wpdb->update( $table_name, array('id' => $id , 'tweet' => $tweet ), array( 'id' => $id ),array("%d","%s"), array("%d") );

Nothing wrong i think , but i can’t update

thanks advanced

Related posts

Leave a Reply

1 comment

  1. $data_update = array('title' => $title ,'parent_id' => $parent_id);
    $data_where = array('id' => $id);
    $wpdb->update($table_name , $data_update, $data_where);
    

    Simple & working 😉