I have a MySQL table with 3 fields; infoid (auto Increment), advertiser (varchar 100), and count (int 11). When I try to update my count column by adding 1 it always adds 2 instead. Can someone explain to me why this is? It seems like it should be a simple process but it is starting to drive me wacky. My simple script is below. Thanks for the help, I appreciate it.
<?php
require_once('emin.php');
$category = "attractions";
$advertiser = "cvb";
if(!empty($category) || !empty($field)){
$query="UPDATE $category SET count=count+1 WHERE advertiser = '$advertiser'";
mysql_query($query);
$result = mysql_query($query) or die ("didn't query");
}
?>