Title: [Plugin: WP Db Abstraction] Fix problems with Backslash Usage
Last modified: August 20, 2016

---

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

 *  Resolved [mauridb](https://wordpress.org/support/users/mauridb/)
 * (@mauridb)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage/)
 * 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/](http://wordpress.org/extend/plugins/wordpress-database-abstraction/)

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

 *  [Runner73](https://wordpress.org/support/users/runner973hotmailcom/)
 * (@runner973hotmailcom)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage/#post-2683045)
 * Hi
    this is a very usefull fix. With this fix I resolved the problem of pagination
   on different theme. Very regards.
 *  [seefeld](https://wordpress.org/support/users/seefeld/)
 * (@seefeld)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage/#post-2683046)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-database-abstraction.svg)
 * [WP Db Abstraction](https://wordpress.org/plugins/wordpress-database-abstraction/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-database-abstraction/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-database-abstraction/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-database-abstraction/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-database-abstraction/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-database-abstraction/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [seefeld](https://wordpress.org/support/users/seefeld/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-db-abstraction-fix-problems-with-backslash-usage/#post-2683046)
 * Status: resolved