On Nov 26, 2010, at 8:36 PM, Richard West wrote:

Hey guys,
I've never run into this before.
I have a field in mysql for page views.
So I pull out value and do +1 to new value - after UPDATE SET it has incremented by 2?

$val = $row['a_downloads'] ;

$new_val = $val+1;

mysql_query("UPDATE cbn_articles SET a_downloads='$new_val' WHERE a_id = '".$_GET['id']."' ");

Any ideas? What am I missing?

a_downloads wouldn't happen to be an autoincrement value, would it?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to