php - SQL OR functioning like AND -
this relevant line of code:
$woquery = $dbc->prepare("select * workorder statusid <> 15 or statusid <> 12 order datein asc");
the problem having code, or function seems working , function.
if change (for example):
statusid <> 15 or statusid <> 15
then correctly excludes records 15 statusid, same if set 12
if have single function no or, filters correctly. however, when have both, filters neither 12 or 15.
use not in 2 or operations
$woquery = $dbc->prepare("select * workorder statusid not in( 15, 12) order datein asc"
Comments
Post a Comment