Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Creating an inner join
 
Lhari
Jr. Member
 
Total Posts:  21
Joined:  2012-01-17
 

Hey guys,

I’m in dire need of some help with making an inner join, I’ve been trying to understand the Varian inner join method, but it doesnt seem like I get it....

I would like my Inner Join to output the following

INNER JOIN belvg_auction_products AS bap ON bap.product_id=product_id

any help with this would be deeply appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

i think this will help you:

->joinInner(array('bap' => 'belvg_auction_products'), 'bap.product_id=product_id''foobar')

The method joinInner is defined lib/Zend/Db/Select.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lhari
Jr. Member
 
Total Posts:  21
Joined:  2012-01-17
 

$collection->getSelect()->joinInner(array('bap' => 'belvg_auction_products'), 'bap.product_id=product_id', array())->where(' bap.start_bid >= "'.$min.'" AND bap.start_bid <= "'.$max.'" ');

Does not seem to work, any ideas as to how I can sort this?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top