Title: [Plugin: Custom Field Template] Database error when updating posts
Last modified: August 19, 2016

---

# [Plugin: Custom Field Template] Database error when updating posts

 *  [sparrows](https://wordpress.org/support/users/sparrows/)
 * (@sparrows)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-database-error-when-updating-posts/)
 * I have a single custom field that I use with this plugin, which updates fine,
   but as soon as I hit update on the page itself, I get a database error:
    `Warning:
   mysql_real_escape_string() expects parameter 1 to be string, array given in /
   usr/www/users/onlinepw/wp-includes/wp-db.php on line 785`
 * I have deactivated all other plugins, and it’s definitely this one that’s causing
   it. Any ideas?
 * Thanks

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

 *  Plugin Author [Hiroaki Miyashita](https://wordpress.org/support/users/hiroaki-miyashita/)
 * (@hiroaki-miyashita)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-database-error-when-updating-posts/#post-1624842)
 * Please show me the template content. I will try it on my server. Thanks.
 *  Thread Starter [sparrows](https://wordpress.org/support/users/sparrows/)
 * (@sparrows)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-database-error-when-updating-posts/#post-1625058)
 * Hi Hiroaki,
    The problem was a poorly chosen custom field name (I named it ‘Content’
   out of laziness). Not sure why that would cause a problem, but I changed the 
   name, and it works now. FYI, here’s the template:
 *     ```
       [Content]
       type = textarea
       rows = 10
       cols = 40
       tinyMCE = true
       htmlEditor = true
       mediaButton = true
       ```
   
 *  Plugin Author [Hiroaki Miyashita](https://wordpress.org/support/users/hiroaki-miyashita/)
 * (@hiroaki-miyashita)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-database-error-when-updating-posts/#post-1625062)
 * It is sometimes reported. `content` and `post_title` are already used by WordPress
   core. So you can not use them for the key. I should fix this some time in the
   future. Thanks.

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

The topic ‘[Plugin: Custom Field Template] Database error when updating posts’ is
closed to new replies.

 * ![](https://ps.w.org/custom-field-template/assets/icon-256x256.png?rev=1966286)
 * [Custom Field Template](https://wordpress.org/plugins/custom-field-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-field-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-field-template/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-field-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-field-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-field-template/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Hiroaki Miyashita](https://wordpress.org/support/users/hiroaki-miyashita/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-database-error-when-updating-posts/#post-1625062)
 * Status: not resolved