Skip to content
Advertisement

Tag: if-statement

PHP If/Else Statements Not Hitting All Cases

I have this as my syntax, and my issue is that if both $employee and $saleDate are set the where clause is added as expected. However, if only $employee OR $saleDate are set, then the where clause is never added to the query. What is the proper way to write this syntax so that the appropriate where clauses is added

Advertisement