Support » Fixing WordPress » Wrong $wpdb->prefix value after AJAX request

  • Resolved supertester



    I am using the following piece of code in a file that handles a AJAX request. I know this is not the way WordPress AJAX works, but this way is about 10x faster.

    ### Define and Include
    define( 'SHORTINIT', true );
    //define( 'WP_USE_THEMES', false);
    include_once '../../../../wp-load.php';
    global $wpdb;
    	echo $wpdb->prefix;

    I never had any problems with this piece of code. But now I am firing an AJAX request from a category page, and the $wpdb->prefix value = ‘wp_’, which it should not be! How on earth is this possible?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Wrong $wpdb->prefix value after AJAX request’ is closed to new replies.