1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/codes/Basic Components - RawSql - Adding components.php

14 lines
383 B
PHP
Raw Normal View History

2006-08-08 13:07:55 +04:00
<?php
$query = new Doctrine_RawSql($conn);
2006-08-08 13:07:55 +04:00
$query->parseQuery("SELECT {entity.*}, {phonenumber.*}
FROM entity
LEFT JOIN phonenumber
ON phonenumber.entity_id = entity.id");
$query->addComponent("entity", "Entity");
2006-08-31 03:02:12 +04:00
$query->addComponent("phonenumber", "Entity.Phonenumber");
2006-08-08 13:07:55 +04:00
$entities = $query->execute();
?>