I'm not sure where the value of $counter is coming from, but it you're
getting it from a SQL SELECT query, it would be more efficient to just
use:
UPDATE statistics SET VALUE(`counter` = `counter`+1)
It's just one less query on the DB, which could make a difference if
you're getting heavy traffic.
Justin Patrin wrote:
> Loïc moisy wrote:
> > 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
Loïc moisy wrote:
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