Is this related to https://trac.cakephp.org/changeset/6641 ?

If the changeset didn't fix the problem, you should re-open the ticket
[4349] with a test case.

On Apr 15, 12:36 pm, bingo <[EMAIL PROTECTED]> wrote:
> oops...
>
> actually both the strings are same..I accidentally placed a
> comma...the only difference between the two is that one is in captial
> letters (upper case) and the other is in lower case.
>
> On Apr 14, 9:05 pm, "b logica" <[EMAIL PROTECTED]> wrote:
>
> > I understand what you mean about "AND" vs. "and" (and my suggestion to
> > use an array stands).
>
> > But this sentence:
> > "if value contains and the query wont work"
>
> > is not the same as this one:
> > "if value contains and  , the query wont work"
>
> > The 2nd example you posted generated a string with a comma and an
> > extra space. I'm not saying there isn't something wrong with Cake's
> > munging of the string. I'm saying that the second example is Not Good
> > because it's changed the string you're trying to use as a comparison.
>
> > On Mon, Apr 14, 2008 at 7:46 PM, bingo <[EMAIL PROTECTED]> wrote:
>
> > >  well, the second example works fine..I tested in on my cakephp
> > >  installation. The problem is with the word "and". I guess whenever
> > >  cakePHP sees "AND" (note capital case), it assumes that another is
> > >  starting. But this is not true for "and" (lower case)
>
> > >  Regards,
>
> > >  On Apr 14, 3:08 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> > >  > It looks to me like the second example will fail also. Note the added 
> > > comma.
>
> > >  > The proper way to deal with this should be to separate your conditions
> > >  > into an array.
>
> > > > On Mon, Apr 14, 2008 at 3:01 PM, bingo <[EMAIL PROTECTED]> wrote:
>
> > >  > >  hi
>
> > >  > >  I just discovered that this condition in a query wont work
>
> > >  > >  //Example 1
> > >  > >  $condition['Model'][upper($field)] = "IF VALUE CONTAINS AND , THE
> > >  > >  QUERY WONT WORK";
> > >  > >  $this->findAll($condition)
> > >  > >  //generates this --> select * from model where upper(field) = "IF
> > >  > >  VALUE CONTAINS" AND ", THE QUERY WONT WORK ".
>
> > >  > >  //Example 2
> > >  > >  $condition['Model'][lower($field)] = "if value contains and the 
> > > query
> > >  > >  wont work"
> > >  > >  $this->findAll($condition);
> > >  > >  //generates this -> select * from model where lower(field) = "if 
> > > value
> > >  > >  contains and  , the query wont work"
>
> > >  > >  Example 1 generate wrong query where as example 2 generate right
> > >  > >  query. The problem is with the word "and" in the value.
>
> > >  > >  Did anyone else faced similar problem. if so let me know how you
> > >  > >  solved the problem- Hide quoted text -
>
> > >  > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to