Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tästä
- $select = $this->select()
- ->from(array('bc' => 'building_contact') )
- ->joinLeft(array('b' => 'building'), 'b.id = bc.building_id', array('id'))
- ->joinLeft(array('c' => 'company'), 'c.id = b.company_id', array('email') )
- ->where('bc.email_sent IS NOT NULL')
- ->limit($limit);
- pitäisi saada tämä:
- SELECT
- bc.*,
- c.email
- FROM
- building_contact bc LEFT JOIN building b ON b.id = bc.building_id
- LEFT JOIN company c ON c.id = b.company_id
- WHERE
- AND bc.email_sent IS NULL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement