title: query magento limit + order by rand()
body: <pre><code>function getIdModelsSliderJuwels(){
   $collection = Mage::getModel("catalog/product")-&gt;getCollection();
   $collection-&gt;addAttributeToFilter("attribute_set_id", 27); 
       $collection-&gt;addAttributeToSelect('modellijnen'); 
     //  $collection-&gt;setRandomOrder();
     //  $collection-&gt;getSelect()-&gt;limit( 5 ); 
   return $collection; 
  }
  </code></pre>
  
  <p>Hi there,</p>
  
  <p>I'd like to know how to set a limit to your query running in Magento because
  <code>$collection-&gt;getSelect()-&gt;limit( 5 );</code> doesn't work.</p>
  
  <p>Also how to select randomly, <code>$collection-&gt;setRandomOrder();</code> also doesn't work.</p>
  
  <p>txs.</p>