Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Tästä
  2. $select = $this->select()
  3. ->from(array('bc' => 'building_contact') )
  4. ->joinLeft(array('b' => 'building'), 'b.id = bc.building_id', array('id'))
  5. ->joinLeft(array('c' => 'company'), 'c.id = b.company_id', array('email') )
  6. ->where('bc.email_sent IS NOT NULL')
  7. ->limit($limit);
  8.  
  9. pitäisi saada tämä:
  10.  
  11. SELECT
  12. bc.*,
  13. c.email
  14. FROM
  15. building_contact bc LEFT JOIN building b ON b.id = bc.building_id
  16. LEFT JOIN company c ON c.id = b.company_id
  17. WHERE
  18. AND bc.email_sent IS NULL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement