> 
> **Possible Duplicate:**  
> 
> [Create a trigger that updates a column on one table when a column in another table is updated](https://stackoverflow.com/questions/2678102/create-a-trigger-that-updates-a-column-on-one-table-when-a-column-in-another-tab) 
> 
> 
> 

I got a database table with these values

```
UpVotes | DownVotes | PercentVotes
8       | 2         | 80
10      | 0         | 100
5       | 5         | 50
560     | 34        | 94

```

is it possible to get the mysql database to work like this:

```
UpVotes | DownVotes | PercentVotes
8       | 2         | (UpVotes/(UpVotes + DownVotes)) x 100 = 80
10      | 0         | (UpVotes/(UpVotes + DownVotes)) x 100 = 100
5       | 5         | (UpVotes/(UpVotes + DownVotes)) x 100 = 50
560     | 34        | (UpVotes/(UpVotes + DownVotes)) x 100 = 94

```

automatically without having to update it via any script? Just like in excel when you can then change the UpVotes value or DownVotes value and the PercentVotes value automatically becomes the new correct percent of upvotes according to the total votes.

Sorry for my bad english but i hope you get my point. :)