MySQL executes several times the same request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everyone !

I've coded a php site for a musical store. At the end of every page, before
closing the connection, I send an UPDATE request to increment a statistical
tool. Recently I saw weird results, so I tried to understand. Looking in my
logs, I saw that this request could be sent several times, arbitrary - can
be 5 times or 8 or whatever... So my counter is incremented from 4 to 8
times. The server seems to resend the whole requestes several times. I have
read all of my scripts, even coded some trace code, and sure there is no
loop.

The code seems like that:

$counter++;
$SQL = "UPDATE statistics SET VALUE (`counter` = $counter)"
$res = mysql_query($SQL);
mysql_closedb($DB);

So, I do not see anything strange. Can u help me ? My own thought about it
is something like a buffer not empty or something like that.

Thanks !

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux