Hi,

Is there a way to inject this into SELECT statements?

This is typically very useful when paging and getting the correct number of results without having to re-run the query twice once with and once without the LIMIT/OFFSET components.

e.g. SELECT SQL_CALC_FOUND_ROWS * from blah LIMIT 10 OFFSET 10;

then SELECT FOUND_ROWS();



If this is something that would be accepted into ZF upstream, then I'll happily code it. It's more or less the same as $select->distinct($flag) function call. The select found rows things could be left to the user.

So, I'm just asking if this would be accepted? If not I'll try and work out another way of achieving the same result without hacking ZF.

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

Reply via email to