'||' is a boolean operator, and it always results in either true or false. So in your example above, $result would become TRUE instead of being a query result (as long as the query was valid, in which case die() would be called). The 'OR' operator always returns the value of the first operand, and it will evaluate operands until it either finds one that can resolve to TRUE, or it runs out of operands. Sound confusing? It is. Maybe this example will help: $result = "0" || 0 || false || "hello"; // $result becomes TRUE $result = "0" OR 0 OR false OR "hello" ; $result becomes "0" Just don't use '||' to do what you're trying to do.