$children = CompanyAccountCatalog::find()
->where("companyId=$companyId")
->andWhere($parentId > 0 ?"parentId=$parentId" :"parentId<=0 OR parentId is null")
->orderBy(new Expression("apAccountId asc, (apAccountId IS NOT NULL OR apAccountId>0) DESC"))->all();
Categories: HINTS (tehnice) |
Leave a Reply
[TOP]