[wp-hackers] Re: Plugin queries executed even when plugin is not
derek at amphibian.info
Wed Jan 21 13:24:52 GMT 2009
I know, I know ... I feel like an idiot. Thanks for taking the time
to have a look and catch that error ... I actually found that myself
last night (after staring at that typo over and over and missing it
every time), and it was indeed the problem. That bad conditional was
running my DB update scheme on every single page load. Oops.
I found the problem thanks to Jeremy's suggestion of installing WP-
Tuner. I can't believe I haven't installed this before - it's
brilliant for troubleshooting.
On Jan 21, 1:47 am, Otto <o... at ottodestruct.com> wrote:
> On Tue, Jan 20, 2009 at 12:27 PM, Derek Hogue <de... at amphibian.info> wrote:
> > Hey all - is this expected behaviour, or have I coded this incorrectly
> > perhaps?
> > My plugin makes its own queries (to its own DB tables) through $wpdb. These
> > queries are all within functions in my plugin files, and these functions are
> > called via either template tags, my plugin's widget or my plugin's
> > shortcodes.
> > However, as soon as my plugin is activated, WP's queries shoot up on every
> > single page load, as though every query within every function in the plugin
> > is being executed regardless of whether you're on a page that actually calls
> > any of these functions, or whether you even have called these functions
> > anywhere in your theme.
> > Any ideas as to why this might be? Needless to say, my users are a little
> > miffed at this.
> In your admin-upgrade.php file:
> $gpo['db_verson'] < $gigpress['db_version']
> You misspelled "version" there. I think that might be causing all your
> extra queries.
> wp-hackers mailing list
> wp-hack... at lists.automattic.comhttp://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers