I'm trying to use a variable in a Update to a field.
The variable will change the amount of the increment that occurs in that field.
I can't use a fixed amount, as it will change according to the user.
The Following won't work
$points = 5;
$query2 = "UPDATE `Cust` SET points = points + $points WHERE name = '$name'";
$result = mysql_query($query2);
What am I doing wrong with the above query?
Yet this one does work
$query2 = "UPDATE `Cust` SET points = points + 5 WHERE name = '$name'";
$result = mysql_query($query2);
Thank you
Ray Ward
ray@lauray.net