SELECT SA_OPOrg.* FROM SA_OPOrg SA_OPOrg join SA_OPPerson SA_OPPerson on SA_OPOrg.sPersonID = SA_OPPerson WHERE (SA_OPOrg.sValidState > 0 AND SA_OPPerson.sValidState > 0) AND ((SA_OPOrg.sValidState=1) AND (SA_OPOrg.sValidState=1) AND ((UPPER(sName) LIKE '%25137%') OR (UPPER(sCode) LIKE '%25137%'))) ORDER BY forder ASC LIMIT 0, -1