Lines Matching refs:QB
25 $QB = new QueryBuilder();
30 $QB->addTable($datatable);
33 $subAnd = $QB->filters()->whereSubAnd();
46 $QB->addLeftJoin(
55 $QB->filters()->whereAnd("$datatable.latest = 1");
56 $QB->filters()->where('AND', 'tag IS NOT \'\'');
61 $MN = $QB->generateTableAlias('M');
63 $QB->addLeftJoin(
73 $col->getType()->select($QB, $MN, 'value', 'tag');
76 $col->getType()->select($QB, $datatable, $col->getColName(), 'tag');
79 $QB->addSelectStatement("COUNT($colname)", 'count');
80 $QB->addSelectColumn('schema_assignments', 'assigned', 'ASSIGNED');
81 $QB->addGroupByStatement('tag');
82 $QB->addOrderBy('count DESC');
84 [$sql, $opts] = $QB->getSQL();