Reputation: 631
(i)
FROM User u
LEFT JOIN u.Phonenumbers where u.level > 1
What is u
, I assume it is just an ALIAS to User
?
(ii)
$profile = Doctrine_Query::create()
->from('Profile p')
->innerJoin('p.User u')
->where('p.id = ?', 1)
->fetchOne();
What is p
and u
here ?
Need to quickly learn Doctrine ? Please can anyone help ? Thanks for your TIme , Cheers !
Upvotes: 0
Views: 102
Reputation:
(i) Yes, u
is an alias for the User
table.
(ii) Here, p
is an alias for the Profile
table, and u
is an alias for the User
table. The phrase p.User u
refers to a relationship between User
and Profile
.
Upvotes: 4
Reputation: 755026
In pure SQL, to which this seems to be related, then 'p' and 'u' would be aliases for the longer table names.
Upvotes: 1