Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $queryBuilder = $this->em->createQueryBuilder();
- $queryBuilder->select("e, 99 as number");
- array(4) {
- [0]=>
- array(2) {
- [0]=> string(30) "Profile_Entity" //notice this is a string but it should be an object instance
- ["number"]=> string(2) "99"
- }
- ...
- ...
- $queryBuilder = $this->em->createQueryBuilder();
- $queryBuilder->select("e");
- $queryBuilder->select("99 as number");
- array(4) {
- [0]=> object(stdClass)#935 (39) {
- ["__CLASS__"]=> string(30) "Profile_Entity"
- ["id"]=> int(46)
- ["headline"]=> string(7) "asdasd
- ...
- ...
- ...
- $queryBuilder -> select('table.column1 alias1, table.column2 alias2');
- $qb -> select('tableAlias1', 'tableAlias2')
- $qb -> from('table1','tableAlias1')
- $qb -> leftJoin('table2','tableAlias2');
- $qb -> select('tableAlias1.column1', 'tableAlias2.column1')
- $qb -> from('table1','tableAlias1')
- $qb -> leftJoin('table2','tableAlias2');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement