Skip to content

Output only matching IDs in db search #158

Description

@johnbillion

When using the wp db search command to search only in a given table (eg. wp_posts), I'd like the output to only contain IDs so I can export them elsewhere without having to extract them from the results which include the matching strings and the context.

Approximately the closest I can get to this is:

wp db search foo wp_posts  --before_context=0 --after_context=0 --one_line

I'd like a flag for the opposite of --matches_only, probably --ids-only.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions