Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134620

supertester on "Wrong $wpdb->prefix value after AJAX request"

$
0
0

Hello,

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;

//Test
	echo $wpdb->prefix;
//Test

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 all articles
Browse latest Browse all 134620

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>