I ended up retrieving the SQL as string and do a string replace and then
execute the SQL statement. Not very elegant but it solved my problem at that
time. If you come up with a more elegant way, please let me know.
Once I have time I'd like to add this as a functionality to the select class
to allow for an DB independant way of doing this. I remember that I asked in
the forum before and at that time it didn't seem to be very much required
and for that reason didn't have much importance.
HTH

Gunter

On Thu, Apr 17, 2008 at 2:07 PM, Mark Steudel <[EMAIL PROTECTED]> wrote:

>  Well couple of problems,
>
>
>
>    1. I can't mix a count() statement in my sql statement the whole
>    mixing group columns with non group columns thing
>    2. Even if I try and trick it by putting at the begging the select
>    methods quote everything, so it because something like:
>
>    SELECT `SQL_CALC_FOUND_ROWS table`.`id` ….
>
>
>
> :/ Any other ideas?
>
>
>
> MS
>
>
>  ------------------------------
>
> *From:* James Dempster [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, April 17, 2008 12:48 PM
> *To:* Mark Steudel
> *Cc:* fw-general@lists.zend.com
> *Subject:* Re: [fw-general] CALC_FOUND_ROWS vs. count(*)
>
>
>
> Have you tried
>
> array('line_items_per_product' => 'CALC_FOUND_ROWS COUNT(*)'))
>
> I think that might work.
>
> --
> /James
>
> On Thu, Apr 17, 2008 at 8:06 PM, Mark Steudel <[EMAIL PROTECTED]> wrote:
>
> Hey Guys,
>
>
>
> I was looking for a way to use CALC_FOUND_ROWS in mysql, I saw in the
> documentation you could get the same thing by doing this:
>
>
>
> array('line_items_per_product' => 'COUNT(*)'))
>
>
>
> If I wanted to do CALC_FOUND_ROWS instead, how would I do it utilizing the
> Zend_DB?
>
>
>
> Thanks, Mark
>
>
>
>
>

Reply via email to