Apr 23, 2004 #1 Forri Programmer Joined Oct 29, 2003 Messages 479 Location MT Hi all I have the following condition: Code: if ($AVE_LEAVE_DAY <= $TOTAL_REMAIN_HRS) { //do something } Where $AVE_LEAVE_DAY = 8 and $TOTAL_REMAIN_HRS = 8; Why is it that the IF condition is not triggered? Thanks nick
Hi all I have the following condition: Code: if ($AVE_LEAVE_DAY <= $TOTAL_REMAIN_HRS) { //do something } Where $AVE_LEAVE_DAY = 8 and $TOTAL_REMAIN_HRS = 8; Why is it that the IF condition is not triggered? Thanks nick
Apr 23, 2004 #2 LTeeple Programmer Joined Aug 21, 2002 Messages 362 Location CA I can't see a reason why it wouldn't be triggered! Your syntax is correct. I can only assume that somewhere the variable is changing where you don't expect it. Just to be sure, right above your if statement, echo out values of the two variables. Cheers! Laura Upvote 0 Downvote
I can't see a reason why it wouldn't be triggered! Your syntax is correct. I can only assume that somewhere the variable is changing where you don't expect it. Just to be sure, right above your if statement, echo out values of the two variables. Cheers! Laura
Apr 23, 2004 Thread starter #3 Forri Programmer Joined Oct 29, 2003 Messages 479 Location MT yes thats what i did and thats where i verified that they were both the same values! i don;t know but could it be that one can store float and the other integer! and this puzzles the condition?? shouldn't be !! Well thanks Ncik Upvote 0 Downvote
yes thats what i did and thats where i verified that they were both the same values! i don;t know but could it be that one can store float and the other integer! and this puzzles the condition?? shouldn't be !! Well thanks Ncik
Apr 23, 2004 #4 DRJ478 IS-IT--Management Joined Aug 10, 2001 Messages 2,264 Location US Just for testing that print out the result of gettype() for the both variables and you'll see. Upvote 0 Downvote
Apr 23, 2004 Thread starter #5 Forri Programmer Joined Oct 29, 2003 Messages 479 Location MT hmm..i'll try it next monday! thanks! Upvote 0 Downvote
Apr 26, 2004 Thread starter #6 Forri Programmer Joined Oct 29, 2003 Messages 479 Location MT Ok i tried the above and the results are: $AVE_LEAVE_DAY = integer $TOTAL_REMAIN_HRS = double Could this pose a problem for the above query!? Tahnks again Nick Upvote 0 Downvote
Ok i tried the above and the results are: $AVE_LEAVE_DAY = integer $TOTAL_REMAIN_HRS = double Could this pose a problem for the above query!? Tahnks again Nick
Apr 26, 2004 #7 KarveR MIS Joined Dec 14, 1999 Messages 2,065 Location GB works ok for me ... unless theres an element of this thread that only I cannot see .. ______________________________________________________________________ There's no present like the time, they say. - Henry's Cat. Upvote 0 Downvote
works ok for me ... unless theres an element of this thread that only I cannot see .. ______________________________________________________________________ There's no present like the time, they say. - Henry's Cat.