Code: Select all
$sql = "UPDATE inv_type SET inv_type_name='$type_name', inv_type_function='$type_function'
WHERE inv_type_name=$original_name";But when I change the WHERE to read:
Code: Select all
$sql = "UPDATE inv_type SET inv_type_name='$type_name', inv_type_function='$type_function'
WHERE inv_type_name='$original_name' ";I assume that I should have the single quotes around all variables?
Thanks
EDIT: The reason I ask is because I copied the first $sql statement from a different page changed some values and the original statement didn't use single quotes around the last variable. So, I'm wondering why one works without the quotes and one doesn't.