I have two different tables from which I need to pull data
blogs
which has the following column
blog_id
and another table which has a variable name, like
$blog_id . "_options
Which has the following columns:
option_id, option_name, option_value
For example:
option_id = 1, option_name='state', option_value='Texas'
option_id = 2, option_name='blog_name', option_value='My Blog'
And finally, I am provided with the following POST data
state
Here's what I need to do: Get the name of any blogs in the area of the POST data. To put it more succinctly, I need to select the option_value
of option_name 'blog_name'
on the same table that option_name='state'
and option_value="$_POST['state']'
and the table names are created from a list of blog_id
's (from the table blogs
) with '_options' appended to the end.
God I don't even know if what I am trying to do can be said with a human mouth.
Anyways, I figure stackoverflow is the place to ask, if anywhere.
Let me know if I can clarify anything for you, i will try.
By the way this is because I am using Wordpress MU and have opted to put some extra settings on the various blog's dynamically created tables.