Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp db tables does not obey prefix when using table wildcards #73

Closed
schlessera opened this issue Dec 21, 2017 · 3 comments
Closed

wp db tables does not obey prefix when using table wildcards #73

schlessera opened this issue Dec 21, 2017 · 3 comments

Comments

@schlessera
Copy link
Member

Default behaviour of wp db tables is to only show tables that match the prefix that is set in the wp-config.php file.

However, if a wildcard is added to only retrieve a specific subset of tables, the prefix in wp-config.php is ignored, and all matching tables are shown.

image 2017-12-21 at 11 44 50 am

In the above screenshot, the queries with a wildcard not only show as_wp_posts, but also wp_posts. The expected behavior would be to only show as_wp_posts. Even trying to force the (default) option to obey the prefix does not produce the expected result.

@BhargavBhandari90
Copy link

@schlessera checking with master branch

db-table

@gitlost
Copy link
Contributor

gitlost commented Jan 8, 2018

@BhargavBhandari90 do

wp db query "CREATE TABLE xx_wp_posts ( id int )" --path=/var/www/wp.me/htdocs

and then try...

@BhargavBhandari90
Copy link

Thanks @gitlost. @schlessera Made some changes in wp-cli/wp-cli for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants