Hi - is it possible to do:
$sql = mysql_query("UPDATE news SET totalcomments=+1 WHERE id='$id'") or die("Arg!");
If so, am I using the correct statement?
Chris
you're close.
$sql = mysql_query("UPDATE news SET totalcomments=totalcomments + 1 WHERE id='$id'") or die(mysql_error());
Cgraz
i'm not sure if sql allows the += : i'd just do it the old fasioned way just in case:
$sql = mysql_query("UPDATE news SET totalcomments= totalcomments + 1 WHERE id='$id'") or die("Arg!");
Hi! 🙂 Thanks both, it worked... quick support, very kind. 🙂
Chris.