Support » Plugin: WP Db Abstraction » [Plugin: WP Db Abstraction] Fix problems with Backslash Usage

• Resolved mauridb

(@mauridb)

If you try to use Backslash in a post, it will skrew up the query rewriting and as a result your post won’t be saved.

In order to fix this I’ve used this patch that needs to be applied to the \wp-content\mu-plugins\wp-db-abstraction\translations\sqlsrv file at the function “translate”:

After the line 208

$this->preg_original =$query = trim($query); insert the following code // Remove backslash in order to avoid problems with rewriting$query = str_replace('\\', '& # 9 2;', $query); and before the line // debug code // file_put_contents[...]; return$query;

insert the following code

// Add backslash again
$query = str_replace('& # 9 2;', '\\',$query);

Please note that the spaces in the replace string has been added only to prevent this forum to turn the encoded value into the HTML equivalent (the backslash), so you should remove it in your code.

http://wordpress.org/extend/plugins/wordpress-database-abstraction/

Viewing 2 replies - 1 through 2 (of 2 total)
• Runner73

(@runner973hotmailcom)

Hi
this is a very usefull fix. With this fix I resolved the problem of pagination on different theme.
Very regards.

seefeld

(@seefeld)

Great tip for those of use using WordPress on SQL! Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
• The topic ‘[Plugin: WP Db Abstraction] Fix problems with Backslash Usage’ is closed to new replies.