Viewing data of selected records

The How it works sections of many recipes use certain values in the database for the explanations. In such recipes, you have to retrieve certain database records using SQL queries. You can use the following steps to execute a query and view the necessary data for the recipes:

  1. Select one of the tables in your database.
  2. Click on the SQL tab to get a screen similar to the following:

  1. To select a record from the wp_options table, replace the default query with the following query. You should replace NAME of THE OPTION with the option name you want to check:
SELECT * FROM `wp_options` WHERE `option_name`='NAME of THE OPTION'
  1. Click on the Go button to retrieve the result for the selected option value.
  2. To select a record from the wp_postmeta table, replace the default query with the following query. You should replace NAME of THE KEY with the meta key you want to check:
SELECT * FROM `wp_postmeta` WHERE `meta_key`='NAME of THE KEY'
  1. Click on the Go button to retrieve the result for the selected meta key.
  2. To select a record from the wp_usermeta table, replace the default query with the following query. You should replace NAME of THE KEY with the meta key you want to check:
SELECT * FROM `wp_usermeta` WHERE `meta_key`='NAME of THE KEY'
  1. Click on the Go button to retrieve the result for the selected meta key.

These are the most commonly used tables in the recipes of this book. You can also query other tables by changing the table name, column name, and value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset