Changeset 4468
- Timestamp:
- 06/02/08 21:46:51 (13 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/manual/docs/en/working-with-objects.txt
r4159 r4468 230 230 <code type="php"> 231 231 $user = Doctrine_Query::create() 232 ->from('User') 233 ->leftJoin('Groups') 234 ->where('id = ?') 235 ->fetchOne(array(1)); 232 ->select('u.*, g.*') 233 ->from('User u') 234 ->leftJoin('u.Groups g') 235 ->where('id = ?', 1) 236 ->fetchOne(); 236 237 237 238 // Display this object on a cool javascript form that allows you to: … … 245 246 246 247 $user = Doctrine_Query::create() 247 ->from('User') 248 ->leftJoin('Groups') 249 ->where('id = ?') 250 ->fetchOne(array(1)); 248 ->select('u.*, g.*') 249 ->from('User u') 250 ->leftJoin('u.Groups g') 251 ->where('id = ?', 1) 252 ->fetchOne(); 251 253 252 254 // sanitize the form input an get the data