PDA

View Full Version : PHP, MYSQL stumper



Teddy
05-12-2009, 03:13 PM
I'm creating an update to increment a model's popularity rating when people click on him. For some reason, it's incrementing by 2.

My query is:

mysql_select_db($database_W, $W);
$query_incrementPopularity = "update mInfo set mInfo.popularity = mInfo.popularity + 1 where mInfo.mID in (select distinct mID from Links where uID = " . $_GET['UID'] .")";

$incrementPopularity = mysql_query($query_incrementPopularity) or die();

I'm testing the data now, so LINKS only has the one row of data corresponding to the model.

When I run the MYSQL in a MYSQL interface, it only increments by a factor of 1. But on the page it increments twice. Any ideas?

Teddy
05-12-2009, 03:37 PM
Interesting discovery . . .

when I use IE it increments by a factor of 1
When I use Firefox it increments by a factor of 2