You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/DB_Command.php
+62-4Lines changed: 62 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1208,10 +1208,10 @@ public function prefix() {
1208
1208
* : Output the 'table:column' line once before all matching row lines in the table column rather than before each matching row.
1209
1209
*
1210
1210
* [--one_line]
1211
-
* : Place the 'table:column' output on the same line as the row id and match ('table:column:id:match'). Overrides --table_column_once.
1211
+
* : Deprecated: use `--format` instead. Place the 'table:column' output on the same line as the row id and match ('table:column:id:match'). Overrides --table_column_once.
1212
1212
*
1213
1213
* [--matches_only]
1214
-
* : Only output the string matches (including context). No 'table:column's or row ids are outputted.
1214
+
* : Deprecated: use `--format` instead. Only output the string matches (including context). No 'table:column's or row ids are outputted.
1215
1215
*
1216
1216
* [--stats]
1217
1217
* : Output stats on the number of matches found, time taken, tables/columns/rows searched, tables skipped.
@@ -1225,6 +1225,12 @@ public function prefix() {
1225
1225
* [--match_color=<color_code>]
1226
1226
* : Percent color code to use for the match (unless both before and after context are 0, when no color code is used). For a list of available percent color codes, see below. Default '%3%k' (black on a mustard background).
1227
1227
*
1228
+
* [--fields=<fields>]
1229
+
* : Get a specific subset of the fields.
1230
+
*
1231
+
* [--format=<format>]
1232
+
* : Render output in a particular format.
1233
+
*
1228
1234
* The percent color codes available are:
1229
1235
*
1230
1236
* | Code | Color
@@ -1293,6 +1299,21 @@ public function prefix() {
1293
1299
* # SQL search and delete records from database table 'wp_options' where 'option_name' match 'foo'
1294
1300
* wp db query "DELETE from wp_options where option_id in ($(wp db query "SELECT GROUP_CONCAT(option_id SEPARATOR ',') from wp_options where option_name like '%foo%';" --silent --skip-column-names))"
1295
1301
*
1302
+
* # Search for a string and print the result as a table
1303
+
* $ wp db search https://localhost:8889 --format=table
0 commit comments