id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 33470 wpdb class method get_table_from_query() malfunctions if table name contains a dash (-) dustinbolton pento "The wpdb class in wp-db.php contains a method get_table_from_query() for getting the table name from a passed query. This method as it stands does not properly handle tables with a dash (-) in the table name, instead only returning the table name characters up the point of the dash. This appears to impact all query formats. Adding a dash (-) in three locations to the regular expressions for the table name capture corrects this issue. '''Examples:''' {{{ get_table_from_query( ""SHOW COLUMNS FROM wp_posts"" ); }}} Returns: wp_posts {{{ get_table_from_query( ""SHOW COLUMNS FROM wp-posts"" ); }}} Returns: wp" defect (bug) closed normal 4.3.1 Database 4.1.2 normal fixed has-patch commit fixed-major