How delete post_content records of specific category from phpmyadmin
How delete post_content records of specific category from phpmyadmin
Custom User registration system
WP Query – grouping posts by same meta key, adding together values from another key
Figured out the SQL query that can be used to reset the display_name to first_name + last_name. And it’s simpler than the JOINs that I was trying when I posted the question. UPDATE wp_users SET display_name = Concat( (SELECT meta_value FROM wp_usermeta WHERE meta_key = ‘first_name’ AND user_id = id ), ‘ ‘, (SELECT meta_value … Read more
Removing Malware
Creating multiple tables with Plugin
both answers were great and helped me a lot ,i used the following to get to wp-config file without really Knowing all database details require_once(‘../wp-config.php’); include_once (‘../wp-load.php’); $con = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD , DB_NAME);
Sql query to get all metadata for a post
How delete post_content records of specific category from phpmyadmin
if you are trying to query from the same database in which your WordPress is installed then there is a great way to do sql query with ease. WordPress has a database access abstraction class called wpdb that allows you to run raw mysql query without any issue. You can start using it like one … Read more
You could do something like this (this code has not been testedt). function schedule_sql_command($user_login, $user) { // 12 hours in seconds. $from_now = 12 * 60 * 60; // schedule a call to a custom hook passing in the user’s ID wp_schedule_single_event(time() + $from_now, ‘run_sql_command’, array( $user->ID) ); } // this is the custom hook … Read more