Skip to content

Instantly share code, notes, and snippets.

@5iDS
Created July 5, 2013 11:09
Show Gist options
  • Save 5iDS/5933836 to your computer and use it in GitHub Desktop.
Save 5iDS/5933836 to your computer and use it in GitHub Desktop.
Search for : ( file wd-db.php ) and replace with the following
<?php
function query( $query ) {
if ( ! $this->ready )
return false;
if ( strpos($query, "CALL") === false )
{
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
$this->set_charset( $this->dbh );
$this->ready = true;
$this->select( $this->dbname, $this->dbh );
}
else
{
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, false,65536 );
$this->set_charset( $this->dbh );
$this->ready = true;
$this->select( $this->dbname, $this->dbh );
}
// some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
if ( function_exists( 'apply_filters' ) )
$query = apply_filters( 'query', $query );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment