Hey, I'm working on a big project and it has a click counter / link exchange, kind of like what you see on a top site list, where it counts the hits that the website has gained.
Now i can figure out how to do this as I've not worked with mySQL(update) alot, however what i'm trying to gain is to be able to, when the file is loaded the field "out" in the database is increased by one every time, in accordance to "lid" (Link ID)
heres is the code, hopefully you can understand better than im explaining by looking at this.
//Adds to the click count for a particular link
db_query("UPDATE links SET out = out + 1 WHERE lid=".$_GET["out"]."","none");
However, i get the error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'out = out + 1 WHERE lid=10' at line 1
Can anyone gimme a hand in pointing out where im going wrong, it would be appreciated greatly.
Thanks in advance,
Phil.
p.s the code is present in pass thru file, so when it goes to the file the codes present in, then it does what it needs to do then redirects, so there is very little connected to this.