I am writing a script to keep track of downloads, and I am having lots of difficulty writing the code to increase the field "num" (for number of downloads) by one each time there is a download.
Right now I have the script:
$sql = mysql_query (UPDATE $table WHERE id='$id' SET num='$num');
But it insists on updating every row in the table, not just the row I want to update!!! If I try anything else, I either get a syntax error, or no result at all . . .
Maybe if I saw some samples of how other people do this in their scripts I could figure it out.