I am trying to do a MySQL Update where the code updates the database if both FACTORY_ID
is 175 and SQUAD is PRODUCTION_SQUAD
. The code works fine when just checking the FACTORY_ID
but then doesn't work when I add the AND. I have tried encasing the 'SQUAD'='PRODUCTION_SQUAD'
in brackets as this is what a lot of examples are telling me to do and it is still not working.
mysql_query("UPDATE Drug_Factory_Thugs SET `HEALTH`='10' WHERE `FACTORY_ID`='175' AND 'SQUAD'='PRODUCTION_SQUAD'")
or die("factory set data connect to database failled!");