php if either one of these statements are true

Associate
Joined
11 Oct 2008
Posts
268
I am using the below code to update my database but it isnt working.
I need the code to run my update if the enemy hp is either 0, or less than 0.

PHP:
if (($enemy_hp == "0") || ($enemy_hp < 0)) {

  mysql_query("UPDATE battle SET status = '2' WHERE id = '1'");

Does anyone have any clues as to what Im doing wrong? thanks for any help
 
Back
Top Bottom