Why doesn't my MySQL code work from PHP. However if I return the SQL and paste it into the SQL console the rows update accordingly.
SQL
UPDATE propertypriority
SET prioritylevel = '8'
WHERE roomtypecode = '1184';
UPDATE property
SET prioritylevel = '8'
WHERE roomtypecode = '1184';
PHP
$sql = "UPDATE propertypriority
SET prioritylevel = '".$demotionvalue."'
WHERE roomtypecode = '".$row['roomtypecode']."'; "
."UPDATE property
SET prioritylevel = '".$demotionvalue."'
WHERE roomtypecode = '".$row['roomtypecode']."'; ";