Using a wordpress database we have tables like wp_options, and wp_postmeta.
These are grouped by primary key ID, then fields like ‘option_name’ and ‘option_value’;
So for example to find out three values I’d need to do 3 different queries.
Is there a proper way to do all of this with only one query?
Please shed some light on this and share the right way to do this.
SELECT option_value FROM bdlocal_wrdp1.wp_options WHERE option_name='siteurl';
SELECT option_value FROM bdlocal_wrdp1.wp_options WHERE option_name='blogname';
SELECT option_value FROM bdlocal_wrdp1.wp_options WHERE option_name='blogdescription';
(returns example.com, Example Blog, This is an example blog.)
And after this query execution you’ll have 3 pairs of
option_name + option_valuevalues.