I am working in a wordpress site, I started to work in local enviroment using xampp server.
I used wpdb to do operations with the database like this:
global $wpdb;
$name = $wpdb->get_results("SELECT meta_value FROM wp_usermeta WHERE meta_key = 'first_name' AND user_id = ".$user." ");
$wpdb->update(
'wp_usermeta',
array(
'meta_value' => $v1
),
array( 'user_id' => $user, 'meta_key' => 'first_name' ),
array(
'%s'
),
array( '%d', '%s')
);
In local enviroments works perfectly but when I migrated the project to an amazon instance, Ubuntu server using nginx and all the operations using $wpdb are not working.
I cant update, I cant insert.
I dont know why.
Any clue?