How to properly configure SSL connection to remote azure database for running queries within a WordPress environment

We do not want to replace our existing db, just run queries through SSL connection against that db from our WordPress. You can create new WPDB objects to connect directly to new MySQL/MariaDB instances, but there is no support for tunnels, it is a direct connection only. For anything else you’d need to proxy it … Read more

How to update multiple row by one query

global $wpdb; $table_name = $wpdb->prefix . ‘table_name’; $data_to_insert = array ( array ( ‘name’ => ‘sample name’, ‘data’ => ‘something’ ), array ( ‘name’ => ‘sample name two’, ‘data’ => ‘something else’ ) ); foreach( $data_to_insert as $data ) { $wpdb->update( $table_name, $data ); }

cannot access wp-admin after options table crash and repair

I think you have lost your Admin Privileges. Please run following SQL query and login to WP Admin using newly created WP ADMIN. INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES (‘4’, ‘demo’, MD5(‘demo’), ‘Your Name’, ‘[email protected]’, ‘http://www.test.com/’, ‘2011-06-07 00:00:00’, ”, ‘0’, ‘Your Name’); INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, … Read more