I have been using the code below in a custom .php file outside of WordPress. The code worked without any issues until upgrading to 3.9 or 3.9.1.
define( 'SHORTINIT', true ); require_once( $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-load.php' ); global $wpdb; $tourney = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM database WHERE player_name='".$player."' And season='".$season."' And status='' ORDER BY date DESC", $null ), ARRAY_N );
Now this error appears:
Call to undefined function __() in /home1/public_html/blog/wp-includes/wp-db.php
What would be the proper method of querying a database outside of WordPress?
- The topic ‘Access database outside of WordPress 3.9’ is closed to new replies.