[fw-general] Help using predicate and nesting conditions

2013-04-18 Thread pobrejuanito
Hey Guys, I can't figure out how I can add parenthesis to generate a statement like one below in ZF2: *EXAMPLE1:* SELECT persons.* FROM persons WHERE *(*givenName LIKE '%john%' OR surname LIKE '%john%' OR givenName LIKE '%doe%' OR surname LIKE '%doe%'*)* AND active = 1 ORDER BY surname ASC LIMIT

Re: [fw-general] Help using predicate and nesting conditions

2013-04-18 Thread Ralph Schindler
The code below generates the following sql statement: * EXAMPLE2:* SELECT persons.* FROM persons WHERE givenName LIKE '%john%' OR surname LIKE '%john%' OR givenName LIKE '%doe%' OR surname LIKE '%doe%' AND active = 1 ORDER BY surname ASC LIMIT '2' OFFSET '0' $spec = function (Where $where) use