Forums

$wpdb running 4 times instead of 1 (1 post)

  1. Joshua
    Member
    Posted 5 months ago #

    Hey,

    I am running this code inside the page courtesy of the exec-php plugin:

    $recent_arr = array('trade_date' => $date, 'most_recent' => '1');
        $wpdb->insert('bu_trade', $recent_arr);

    It appears the page is run 4 times as the data gets inserted 4 times with different auto-increment values.

    I have tried disabling all plugins save exec-php and still have this problem so I am thinking it's either a WP glitch or a Thesis glitch.

    I have tried adding $wpdb->flush(); to the end of my code aswell however it appears to clear the "master" query and WP fails to load.

    If it helps her is the full code

    Has anybody had this problem and knows how to fix it or have any ideas.

Reply

You must log in to post.

About this Topic