On Fri, Feb 09, 2001 at 10:28:25AM +0100, Oskar ?wida wrote:
>
> >I think that the thing could be more neatly implemented (without string
> >chopping) using the doRawSelect method that fanyun suggested and I
> >believe John is about to commit.
>
> Yes, I looked at it, but there is one more problem with SQL (at least with
> MySQL)
> OR I don't understand something in doRawSelect...
>
> Function getCount() sent by funyun looks OK for all records, but
> when you have an Criteria object filled - that means BasePeer creates
> query string like: "select table.id,table.name from table where ...." etc.
> you cannot simply add column "count(...)" into Criteria,
> because mixing of GROUP columns
> and no GROUP columns is illegal without GROUP BY clause...
Part of the point of the changes (although I cannot say for sure until
John checks in what he has done) is that doRawSelect *won't* add those
select columns - that is the job of the regular doSelect. This allows
you to add just the 'count(*)' select column.
(BTW, aren't non group columns strictly illegal with a GROUP BY clause
too - I know that MySQL allows it, but recommends against it unless you
know for sure that all values of the column will be the same - it just
picks a random row out of the group).
> > Czlowiekiem jestem i nic co ludzkie nie jest mi obce
>
> ??? Polish sentence?
Yes, a donation from Rafal if I remember correctly. I have other
languages too (see below) :-)
--
Sean Legassick
[EMAIL PROTECTED]
Ek is 'n man: niks menslik is vreemd vir my nie
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]