function getIdModelsSliderJuwels(){
$collection = Mage::getModel("catalog/product")->getCollection();
$collection->addAttributeToFilter("attribute_set_id", 27);
$collection->addAttributeToSelect('modellijnen');
// $collection->setRandomOrder();
// $collection->getSelect()->limit( 5 );
return $collection;
}
Run Code Online (Sandbox Code Playgroud)
嗨,您好,
我想知道如何为在Magento中运行的查询设置限制因为
$collection->getSelect()->limit( 5 );不起作用.
另外如何随意选择,$collection->setRandomOrder();也行不通.
TXS.
magento ×1