1

I know it is possible to perform followings with ZF 2

$select->join(//$select is zend db sql select
                            array(
                                'cs' => 'table1'), 
                                'ts.id=cs.cs_id', 
                                array(),$select::JOIN_TYPE);

according to the manual (http://framework.zend.com/manual/2.2/en/modules/zend.db.sql.html)JOIN_TYPE can be any of follows, and they are producing what they mean

JOIN_INNER 
JOIN_OUTER 
JOIN_LEFT   
JOIN_RIGHT 

but I simply want to add normal join $select->join produce an Inner join. Dose any one know any way

enter image description here

Ruwantha
  • 2,603
  • 5
  • 30
  • 44
  • 1
    What do you mean by 'normal join'? If you mean using `JOIN` on its own, it's the same as using `INNER JOIN` -> http://stackoverflow.com/a/565640/1112089 – Crisp Apr 05 '14 at 17:00
  • 1
    mysql doesn't have full join http://stackoverflow.com/questions/7978663/mysql-full-join – Exlord Apr 06 '14 at 09:47
  • full join emulation http://stackoverflow.com/questions/4796872/full-outer-join-in-mysql – Exlord Apr 06 '14 at 09:51

1 Answers1

0

I'm not sure that i get what you mean but maybe this will help you

use Zend\Db\Sql\Select;



 $select10 = new Select;
    $select10->from('foo')->join('zac', 'm = n');
    // 'SELECT "foo".*, "zac".* FROM "foo" INNER JOIN "zac" ON "m" = "n"';

If you follow the link below you may find what you need.

References here

dixromos98
  • 756
  • 5
  • 18