WordPress DB query

Without really knowing everything about how you’ve set up your site, I can only offer a generic answer to your questions. If you have set up a way to save information to the database about who played which game and when, then you should be able to query those information. You can save data to … Read more

how to run tests using different db connection

Changing the DB connection used by a WPDB object that already exists or passing it a mysqli instance is not possible. And if it was, it still wouldn’t work for other reasons. if you want to access a new database connection you need to create a new WPDB instance: $second_db = new WPDB( ‘dbuser’, ‘dbpassword’, … Read more

wp db request without refreshing the page

Instead of querying the database directly, you could use WP_User_Query, but you’ll get the best results by querying the REST API endpoint with a GET request at /wp-json/wp/v2/users which already lists out the users in a WordPress install. Just remember to account for pagination.

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