Update database record in plugin

It’s really hard to understand what are you actually doing ( a refactor will help also). but for updating you can try: You will need the $id, show you tell which row to update. $wpdb->update( $wpdb->prefix . ‘tropix_dmin’, array( ‘post_name1’ => $arr), array( ‘id’ => $id ), array( ‘%s’ ), array( ‘%d’ ) );

How to Update multiple rows using $wpdb->update

It is a a bit of a stab in the dark, but I’m fairly confident that the problem is your foreach loop. It’s broken (it will not execute anything because only an empty statement (;) is affected, and you will probably want it to have a block that contains the rest of the code. As … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)