tags:

views:

32

answers:

2

Hi All ,

(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 !

+1  A: 

In pure SQL, to which this seems to be related, then 'p' and 'u' would be aliases for the longer table names.

Jonathan Leffler
+2  A: 

(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.