Link to home
Start Free TrialLog in
Avatar of rcowen00
rcowen00Flag for United States of America

asked on

MySql Select Query Criteria

The results of the query below returns currSev as a number.  How do I limit the results to just records that reflect a 1 for that field?
$impfindings="SELECT *, IFNULL(stSeverity,customSeverity) AS currSev FROM loanFinding "
    ."JOIN finding USING (findingKey) "
    ."JOIN findingCategory USING (findingCategoryKey) "
    ."WHERE loanFinding.active='1' AND loanFinding.auditID='$auditID' "
    ."ORDER BY currSev";

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of simonpaul64
simonpaul64

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _bmendoza
_bmendoza

$impfindings="SELECT *, IFNULL(stSeverity,customSeverity) AS currSev FROM loanFinding "
    ."JOIN finding USING (findingKey) "
    ."JOIN findingCategory USING (findingCategoryKey) "
    ."WHERE loanFinding.active='1' AND loanFinding.auditID='$auditID'  AND (stSeverity=1 OR customSeverity=1)"
    ."ORDER BY currSev";

Open in new window