I'm fairly new to mysql databases so i'm probably doing something very silly. Here's my problem.
I'm using php to update the database. All i'm trying to do is add 1 to a hit count number and update it in the database.
When i update, i use this query
mysql_query( "UPDATE site_pages SET page_views='$count' WHERE page_id='$output->page_id'" )
Where $count is the updated hitcount. The problem is, for some reason when the value get's entered into the database it's been increased by 7. For example, if $count holds the value '40' it get's entered into the database as 47.
I've done all the necessary checks to make sure that $count is indeed the correct value i want.
Yes i tried this and the output is what it should be. But after running the script, then checking the database, the result in the database is +7 of what is output on the page. This is how i identified it as a mysql problem.
I've investigated this further though and it just get's more confusing. Now i'm thinking it isnt strictly a mysql issue, but i really can't explain it.
But i can't understand how this affects the hitcounter part of my script. The only difference is a script that parses the url as opposed to using $_GET['page']. But it has nothing to do with the hit count part.