Using variables in wpdb calls?
-
Hi, quick question. Im working with WPMU -but just now I have a query to do with the general WPDB calls.
I have a query that pulls the blog_id from the blogs table. I then go into a loop. In that loop, I want to use a query similar to:
$wpdb->query(“SELECT * FROM {$wpdb->$VARIABLE_posts}”);
Basically the variable is passed from the first query (say the number 4). It should then be dumped into the second query, so that the second query turns out to be:
$wpdb->query(“SELECT * FROM {$wpdb->4_posts}”);
but its just now happening. Am I trying too hard and theres a simple way of doing it? Or am I missing something else?
Thanks in advance for the help!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Using variables in wpdb calls?’ is closed to new replies.