Title: Insert Data into Database when Post is Published
Last modified: August 21, 2016

---

# Insert Data into Database when Post is Published

 *  [inglaur](https://wordpress.org/support/users/inglaur/)
 * (@inglaur)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/insert-data-into-database-when-post-is-published/)
 * Hi, I want to insert 2 values automatically into the WordPress Database when 
   a post is publised.
 * The table is wp_data_article and I want two columns to be updated – user voters(
   in this case the value is one) and User Vote (in this case value is 9)
 * What can I put into functions.php to do this?

The topic ‘Insert Data into Database when Post is Published’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [inglaur](https://wordpress.org/support/users/inglaur/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/insert-data-into-database-when-post-is-published/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
