1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Basic Components - Query - FROM - selecting tables.php

25 lines
567 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
// find all groups
$coll = $q->from("FROM Group");
2006-07-24 01:08:06 +04:00
// find all users and user emails
$coll = $q->from("FROM User.Email");
2006-08-17 13:42:18 +04:00
// find all users and user emails with only user name and
2006-08-17 13:42:18 +04:00
// age + email address loaded
$coll = $q->select('u.name, u.age, e.address')
->from('FROM User u')
->leftJoin('u.Email e')
->execute();
2006-08-17 13:42:18 +04:00
// find all users, user email and user phonenumbers
2006-07-24 01:08:06 +04:00
$coll = $q->from('FROM User u')
->leftJoin('u.Email e')
->leftJoin('u.Phonenumber p')
->execute();
2006-07-24 01:08:06 +04:00
?>