Title: Need help sintaxe update
Last modified: August 22, 2016

---

# Need help sintaxe update

 *  Resolved [ijribeiro](https://wordpress.org/support/users/ijribeiro/)
 * (@ijribeiro)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/need-help-sintaxe-update/)
 * There is an error in this syntax $wpdb->update($table_name, $data, $where); because
   giving in research this right but it does not run in my wordpress 4.0.1.

Viewing 1 replies (of 1 total)

 *  Thread Starter [ijribeiro](https://wordpress.org/support/users/ijribeiro/)
 * (@ijribeiro)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/need-help-sintaxe-update/#post-5556924)
 * $data = array(
    ‘usuario_nome’ => $usuario_nome, ‘usuario_data_nasci’ => $usuario_data_nasci,‘
   usuario_email’ => $usuario_email, ‘usuario_senha’ => $usuario_senha, ‘usuario_dica_senha’
   => $usuario_dica_senha, ‘usuario_email_alternativo’ => $usuario_email_alternativo,‘
   usuario_fone_fix’ => $usuario_fone_fix, ‘usuario_fone_celular’ => $usuario_fone_celular,‘
   usuario_status_pagamento’ => 0 );
 *  $where = array(‘cadastro_email_id’ => $id);
    $data_format = array(‘%s’, ‘%s’,‘%
   s’, ‘%s’, ‘%s’, ‘%s’, ‘%s’, ‘%s’, ‘%s’); $where_format = array(‘%d’);
 *  $wpdb->update($table_name, $data, $where, $data_format, $where_format);
 * I managed to correct the error by using the function of class wpdb, I noted the
   need to define the variables,
    $data_format = array(‘%s’, ‘%s’, ‘%s’, ‘%s’, ‘%
   s’, ‘%s’, ‘%s’, ‘%s’, ‘%s’); $where_format = array(‘%d’);

Viewing 1 replies (of 1 total)

The topic ‘Need help sintaxe update’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [ijribeiro](https://wordpress.org/support/users/ijribeiro/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/need-help-sintaxe-update/#post-5556924)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
