# PHP to increment a mySQL field?

**URL:** https://forum.kirupa.com/t/php-to-increment-a-mysql-field/285250
**Category:** programming
**Created:** [March 29, 2009, 3:06pm UTC](https://forum.kirupa.com/t/php-to-increment-a-mysql-field/285250 "2009-03-29T15:06:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![juniorspecial](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/juniorspecial/32/2610_2.png) [@juniorspecial](https://forum.kirupa.com/u/juniorspecial)
#### Post date: [March 29, 2009, 3:06pm UTC](https://forum.kirupa.com/t/php-to-increment-a-mysql-field/285250/1 "2009-03-29T15:06:05Z")

</div>

How do I use PHP to increment a mySQL field?

I’m trying to add capabilities to my Flash application to track each time someone clicks  
each button. So I figure the way to do that is to have flash call some PHP code to increment a mySQL field which corresponds to the button in a database.

But I don’t understand PHP enough to write it.

For instance, what would be the PHP code to increment a field called “button1” in database “tracker?”

thanks,
