0

I'm supporting 2 different websites. One uses the default Zend libraries in /usr/share (v 1.12) and the other uses specifically installed Zend libraries, which are v 2.3.

I'm trying to copy some code across from one setup to another and have encountered a problem, that ->joinUsing( is not defined in ZF2.

So can someone tell me how I can create a join, using Zend/Db in ZF2, that joins 2 tables using a USING, such that the 2nd instance of the joined column, doesn't get in the way of the query.

1 Answer 1

2

ZF2 just has a join() function, with an optional parameter to supply if you want a specific join type. See http://framework.zend.com/manual/2.3/en/modules/zend.db.sql.html#join for an example.

Note that ZF2 is not backward compatible with ZF1, so if you haven't realised this already, you'll need to make a number of changes to get the ZF1 code working.

1
  • Thanks, that's what I thought. Annoying, as I find using ON where both fields are the same name, untidy, but needs must :-)
    – sibaz
    Jul 28, 2014 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.