• Resolved ijribeiro

    (@ijribeiro)


    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

    (@ijribeiro)

    $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.