本文整理汇总了PHP中Mage_Core_Model_Mysql4_Abstract::_getLoadSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Mysql4_Abstract::_getLoadSelect方法的具体用法?PHP Mage_Core_Model_Mysql4_Abstract::_getLoadSelect怎么用?PHP Mage_Core_Model_Mysql4_Abstract::_getLoadSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Mysql4_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Mysql4_Abstract::_getLoadSelect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getOrderId()) {
$select->join(array('order_table' => $this->getTable($this->_tableName . '_order')), $this->getMainTable() . '.log_id = order_table.log_id')->where('order_table.order_id IN (?) ', $object->getOrderId())->order('order_id DESC');
}
return $select;
}
示例2: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Mage_Core_Model_Abstract $object
*
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->join(array('cps' => $this->getTable('store')), $this->getMainTable() . '.post_id = `cps`.post_id')->where('`cps`.store_id in (0, ?) ', $object->getStoreId())->order('store_id DESC')->limit(1);
}
return $select;
}
示例3: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->where('is_active=1 and (store_id=? OR store_id=0)', $object->getStoreId());
}
return $select;
}
示例4: _getLoadSelect
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->join(array('cbs' => $this->getTable('ves_megamenu/megamenu_store')), $this->getMainTable() . '.megamenu_id = cbs.megamenu_id')->where('cbs.store_id in (0, ?) ', $object->getStoreId())->order('cbs.store_id DESC')->limit(1);
}
return $select;
}
示例5: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->join(array('nns' => $this->getTable('hm_faq/faq_store')), $this->getMainTable() . '.item_id = `nns`.faq_id')->where('is_active=1 AND `nns`.store_id in (0, ?) ', $object->getStoreId())->order('creation_time DESC')->limit(1);
}
return $select;
}
示例6: _getLoadSelect
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->join(array('cps' => $this->getTable('splash/splash_store')), $this->getMainTable() . '.splash_id = `cps`.splash_id')->where('active=1 AND `cps`.store_id in (' . Mage_Core_Model_App::ADMIN_STORE_ID . ', ?) ', $object->getStoreId())->order('store_id DESC')->limit(1);
}
return $select;
}
示例7: _getLoadSelect
/**
* Retrieve the load select object
*
* @param string $field
* @param mixed $value
* @param Mage_Core_Model_Abstract $object
* @return Varien_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!Mage::app()->isSingleStoreMode() && Mage::app()->getStore()->getId() > 0) {
$select->where('store_id IN (?)', array(0, Mage::app()->getStore()->getId()))->order('store_id DESC')->limit(1);
}
return $select;
}
示例8: _getLoadSelect
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
// Obey Account Sharing scope
if (Mage::getModel('customer/config_share')->isWebsiteScope()) {
$select->join(array('customer' => $this->getTable('customer/entity')), $this->getMainTable() . '.customer_id = customer.entity_id AND customer.website_id = ' . Mage::app()->getWebsite()->getId());
}
return $select;
}
示例9: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param TM_Testimonials_Model_Data $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('store' => $this->getTable('tm_testimonials/store')), $this->getMainTable() . '.testimonial_id = store.testimonial_id', array())->where('status = ?', 1)->where('store.store_id IN (?)', $storeIds)->order('store.store_id DESC')->limit(1);
}
return $select;
}
示例10: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!is_null($object->getStoreId())) {
$select->where('store_id=0 or store_id=?', $object->getStoreId());
$select->order('store_id', 'desc');
}
return $select;
}
示例11: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($data = $object->getStoreId()) {
$select->join(array('store' => $this->getTable('igallery/banner_store')), $this->getMainTable() . '.banner_id = `store`.banner_id')->where('`store`.store_id in (0, ?) ', $data);
}
$select->order('name DESC')->limit(1);
return $select;
}
示例12: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Mage_Cms_Model_Page $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('amlanding_page_store' => $this->getTable('amlanding/page_store')), $this->getMainTable() . '.page_id = cms_page_store.page_id', array())->where('is_active = ?', 1)->where('amlanding_page_store.store_id IN (?)', $storeIds)->order('amlanding_page_store.store_id DESC')->limit(1);
}
return $select;
}
示例13: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
if ($field == 'default_state') {
$select = $this->_getReadAdapter()->select()->from($this->getMainTable())->join(array('state_table' => $this->_stateTable), $this->getMainTable() . '.status=state_table.status', 'status')->where('state_table.state=?', $value)->order('state_table.is_default DESC')->limit(1);
} else {
$select = parent::_getLoadSelect($field, $value, $object);
}
return $select;
}
示例14: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
/* @var $select Varien_Db_Select */
$select = parent::_getLoadSelect($field, $value, $object);
if (!is_null($object->getStoreId())) {
$select->where('store_id IN(?)', array(0, $object->getStoreId()));
$select->order('store_id desc');
$select->limit(1);
}
return $select;
}
示例15: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($data = $object->getPageId()) {
$select->join(array('page' => $this->getTable('lookbookslider/page')), $this->getMainTable() . '.lookbookslider_id = `page`.lookbookslider_id')->where('`page`.page_id in (?) ', $data);
}
if ($data = $object->getCategoryId()) {
$select->join(array('category' => $this->getTable('lookbookslider/category')), $this->getMainTable() . '.lookbookslider_id = `category`.lookbookslider_id')->where('`category`.category_id in (?) ', $data);
}
//$select->order('name DESC')->limit(1);
return $select;
}