ameriblog Posted September 12, 2007 Share Posted September 12, 2007 I have an IF statement in my code, what I am trying to accomplish is get IF the variable is 1-16. Right now I have it set to be <= 16, but it is getting results that are 0 that I don't want. if ( $team2_rs->Fields("team_mpirk") <= 16 ) { } Quote Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/ Share on other sites More sharing options...
Barand Posted September 12, 2007 Share Posted September 12, 2007 if ( ($team2_rs->Fields("team_mpirk") <= 16) && ($team2_rs->Fields("team_mpirk") > 0) ) { } Quote Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/#findComment-347241 Share on other sites More sharing options...
ameriblog Posted September 12, 2007 Author Share Posted September 12, 2007 Thanks, for some reason I was thinking || instead of &&, bad day Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/#findComment-347246 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.