[PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Diana Cassady
Another one that should be easy that I am just not finding anywhere in the manual. How do I put an 'and' or an 'or' in an if statement? I know I could achieve the same results with multiple if statements, but that seems so inefficient. Lets say I wanted to check a bunch of fields to make sure

Re: [PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Matt Matijevich
http://www.php.net/manual/en/language.operators.logical.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Sebastian Haag
Diana, Diana Cassady said: Another one that should be easy that I am just not finding anywhere in the manual. How do I put an 'and' or an 'or' in an if statement? I know I could achieve the same results with multiple if statements, but that seems so inefficient. Lets say I wanted to

RE: [PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Jennifer Goodie
Lets say I wanted to check a bunch of fields to make sure they weren't empty. I can check one field by saying: if ($field1) { echo Field 1 is not empty; } I'd use empty() since certain values would cause your if to evalute to false http://www.php.net/manual/en/function.empty.php