WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using $wpdb->flush(); at the base of my page in an attempt to prevent the query executing multiple times due to caching however it seems that it isn't flushing the most recent query but the entire cache as my page is not loading past generating my content.

Possibly Relevant information:

  • I am using the exec-php plugin and consequently this page is entirely php
  • I am also having another possibly related problem as detailed here
share|improve this question
up vote 1 down vote accepted

In the code you posted in your other question, your call to flush() is using the wrong variable: $wpdp->flush();.

Since this is an undefined variable, it's likely that you're simply getting a PHP runtime error at this point, stopping page execution.

share|improve this answer
The $wpdb->flush() does exist according to The Codex – Joshua Dec 14 '11 at 3:32
Yes, $wpdb does exist, but $wpdp does not exist. Notice the difference, mainly in the spelling. – Otto Dec 14 '11 at 22:05
Touche, my good sir. – Joshua Dec 14 '11 at 23:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.