Lines Matching refs:QB
57 $QB = new QueryBuilder();
65 … $QB->addLeftJoin($first_table, $datatable, $datatable, "$first_table.pid = $datatable.pid");
68 $QB->addTable($datatable);
71 $subAnd = $QB->filters()->whereSubAnd();
79 $QB->addLeftJoin(
88 $QB->addSelectColumn($datatable, 'rid');
89 $QB->addSelectColumn($datatable, 'pid', 'PID');
90 $QB->addSelectColumn($datatable, 'rev');
91 $QB->addSelectColumn('schema_assignments', 'assigned', 'ASSIGNED');
92 $QB->addGroupByColumn($datatable, 'pid');
93 $QB->addGroupByColumn($datatable, 'rid');
98 $QB->filters()->whereAnd("$datatable.rev =
102 $QB->filters()->whereAnd("$datatable.latest = 1");
115 $MN = $QB->generateTableAlias('M');
117 $QB->addLeftJoin(
126 $col->getType()->select($QB, $MN, 'value', $CN);
127 $sel = $QB->getSelectStatement($CN);
128 $QB->addSelectStatement("GROUP_CONCAT($sel, '$sep')", $CN);
130 $col->getType()->select($QB, 'data_' . $col->getTable(), $col->getColName(), $CN);
131 $QB->addGroupByStatement($CN);
137 $userWHERE = $QB->filters()->where('AND');
148 $MN = $QB->generateTableAlias('MN');
150 $QB->addLeftJoin(
174 $col->getType()->sort($QB, 'data_' . $col->getTable(), $colname, $asc ? 'ASC' : 'DESC');
177 return $QB->getSQL();