title: Minimum and maximum of a field in cakephp and mysql
body: <p>I am trying to build a search function for a cakephp and mysql site. Selecting different parameters like price of the product or the length triggers an ajax call which returns the number of matching results. I want to extend the returned results with the the minimum and maximum values for the lengths and prices. I tried doing this, <a href="http://bin.cakephp.org/view/1004813660">http://bin.cakephp.org/view/1004813660</a> . Using the first 4 finds is too time consuming. The last one functions locally, but I get the error;</p>
  
  <p>1140 - Mixing of GROUP columns (MIN(),MAX(),,...) with no GROUP columns is illegal if there is no GROUP BY clause`</p>
  
  <p>remotely, due to  ONLY_FULL_GROUP_BY being on.</p>
  
  <p>Is it possible to use the last option with some improvements, or can I switch off ONLY_FULL_GROUP_BY? </p>