It depends on what action you're doing in the button. For example if you're inserting data within the button code then it sounds that you don't have proper keys in the database and checks in the application to notice that you're generating a duplicate data. In such case you would insert the same row over and over again. To prevent duplicate data, use constraints such as primary key or unique key. For more info, see
http://en.wikipedia.org/wiki/Unique_key[
^]
If you're fetching data then you probable have a problem in the query like a missing join which would cause a cross join or other missing definitions in the WHERE clause.