mysqldump throws: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109)

This is due to a new flag that is enabled by default in mysqldump 8. You can disable it by adding –column-statistics=0. The command will be something like: mysqldump –column-statistics=0 –host=<server> –user=<user> –password=<password> Check this link for more information. To disable column statistics by default, you can add [mysqldump] column-statistics=0 to a MySQL config file, … Read more

Custom route and query

There are 3 issues with your code: The proper syntax of registering your custom REST API route, is as follows: register_rest_route( $namespace, $base_URL, $args, $override ); So: register_rest_route( ‘boss/v1’, ‘/latest-quiz-results’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘get_latest_quiz_results’ ) ); Consult the reference for more information. In the get_latest_quiz_results(), $wpdb is not defined because you’re missing … Read more

Getting Error Trying to Create Table

From MySQL reference: Permitted characters in unquoted identifiers: ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) Extended: U+0080 .. U+FFFF Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000: ASCII: U+0001 .. U+007F Extended: U+0080 .. U+FFFF ASCII NUL (U+0000) and supplementary characters (U+10000 and higher) are not … Read more

How to get INSERT errors from $wpdb?

To insert data you should use query() (documentation), get_var() method is for selecting data. If error is encountered, query() returns FALSE. query() This function returns an integer value indicating the number of rows affected/selected for SELECT, INSERT, DELETE, UPDATE, etc. For CREATE, ALTER, TRUNCATE and DROP SQL statements, (which affect whole tables instead of specific … Read more

WordPress insert query is not working : Showing no Error

There appears to be a syntax error on line 4. string is not quoted ↓ ↓ ↓ $sql = “CREATE TABLE IF NOT EXISTS ” . $wpdb->prefix.credofy_contact_form. ” ( Instead, I would recommend moving your table creation logic to a plugin and having it run off an installation hook. Below is an example: <?php /** … Read more

A $_POST should occur when submit form but is not?

Add this to functions.php add_action(‘wp_ajax_post_language’,’post_language’); and then make either of following changes in your code. Because your jquery code is sending FirstNM to server (not FirstName). Therefore in post_language() function, change this line $FirstName = isset( $_POST[‘FirstName’] ) ? $_POST[‘FirstName’] : ”; to $FirstName = isset( $_POST[‘FirstNM’] ) ? $_POST[‘FirstNM’] : ”; OR Change ‘FirstNM’: … Read more