Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This gets the database table structure for some of the tables
- * to see if they share the same structure. If they don't, then
- * this could be why the table constraints are throwing errors
- */
- add_action('init', function() {
- global $wpdb;
- $dbTableStructure = $wpdb->get_results("
- SELECT TABLE_NAME, TABLE_COLLATION, ENGINE
- FROM information_schema.TABLES
- WHERE TABLE_SCHEMA = '{$wpdb->dbname}' AND TABLE_NAME IN ('{$wpdb->posts}', '{$wpdb->users}', '{$wpdb->terms}', '{$wpdb->prefix}glsr_ratings', '{$wpdb->prefix}glsr_assigned_posts', '{$wpdb->prefix}glsr_assigned_terms', '{$wpdb->prefix}glsr_assigned_users')
- ");
- glsr_log($dbTableStructure);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement