On Saturday, August 11, 2012 10:13:54 PM UTC-4, Samuel Moffatt wrote:
> I agree that having the operator there all of the time doesn't make
> sense in addition to being something not particularly backwards
> compatible friendly. In the vast majority of cases an AND statement as
> a default makes sense. I do like where this is headed however as it
> allows the same level of simplicity with have with a reasonably quick
> way of overriding the glue on a per clause basis.
> Cheers,
> Sam Moffatt
> http://pasamio.id.au
> On Thu, Aug 9, 2012 at 6:10 PM, elin <elin....@gmail.com <javascript:>>
> wrote:
> > $query->where(array ('field.a = 1' ,'field.b = 2'), 'OR' );
> > is also an alternative.
> > No I don't think it's particularly more logical to have it first
> especially
> > since it is optional both because sometimes you have only one condition
> and
> > because sometimes you are using AND and just want to use the default. If
> you
> > put it first you would have to deal with it all the time.
> > Elin
> > On Thursday, August 9, 2012 3:48:19 PM UTC-4, Adam Stephen Docherty
> wrote:
> >> oh and I do realise that this kind of change would "break the world" so
> it
> >> is probably not feasible at this time...
> >> On Thursday, August 9, 2012 4:46:14 PM UTC-3, Adam Stephen Docherty
> wrote:
> >>> Would it not seem more readable to have the second argument as it
> >>> currently stands:
> >>> $query->where( 'field.a = 1', 'OR' );
> >>> $query->where( 'field.b = 2' );
> >>> Changed to be the first argument:
> >>> $query->where( 'field.a = 1' );
> >>> $query->where( 'OR', 'field.b = 2' );
> >>> Also have it a *requirement to declare the operator in the first
> argument
> >>> of a where() method following another. This seems to be more logical
> to me.
> >>> Also when the sql in the first argument is long it can be easy to miss
> the
> >>> addition of the operator override...
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "Joomla! CMS Development" group.
> > To view this discussion on the web, visit
> > https://groups.google.com/d/msg/joomla-dev-cms/-/Q7FwJ4ivRg4J.
> > To post to this group, send an email to joomla-...@googlegroups.com<javascript:>.
> > To unsubscribe from this group, send email to
> > joomla-dev-cm...@googlegroups.com <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/joomla-dev-cms?hl=en-GB.