Here are 3 requests, for the first two I will immediately say: the second one works for me, but the first one, which is always advised, is not. The question in general is, what is the key difference between these variables in the query?
$result = mysql_query ("UPDATE $table SET $table.field=".$A." WHERE $table.field2=".$B."", $db); $result = mysql_query ("UPDATE $table SET $table.field='$A' WHERE $stable.field2='$B'", $db); $result = mysql_query ("UPDATE $table SET $table.field=$A WHERE $table.field2=$B", $db);
Than ". $ A." different from '$ A'?
With the latter, where just $ A is clear, if there is a string variable, a space can come.