View Full Version : UPDATE will not add properly

08-15-2006, 04:40 AM
I have an online comic engine I'm working on, and I just noticed that, as opposed to adding one view (like it should) it will always add two. Can anyone help me out with this? I've already determined it's just this line of code, and that it's not being called twice.

$query = "UPDATE `".SQL_COMICS."` SET comic_views = (comic_views + 1) WHERE comic_id = '".$comic_id."' LIMIT 1";
mysql_query($query) or die(mysql_die_message());

08-15-2006, 06:58 AM
Looks ok to me, it must be elsewhere in your code. What does that echo($query) show you?

08-15-2006, 04:30 PM
You're calling that line twice or you have a line that is doing the same thing somewhere else in your code.