npacker / nFramework

A simple MVC framework in PHP.
1 stars 0 forks source link

Implement Logical WHERE clause groupings #3

Closed npacker closed 9 years ago

npacker commented 10 years ago

Want to be able to specify multipe WHERE clause groups:

WHERE { a = h AND b = i } AND { c = j OR d = k }

WHERE { a = h OR b = i }

Larger groups collect columns under logical operators such that grouped columns are applied under either AND or OR operator in relation to other groupings.

WHERE OR method AND method

Possibly a WHERE object with those two methods attached will provide this functionality. Pass the query by reference and return the query from the WHERE object.

Possible code syntax: ->where($column, $value, $operator) ->orClause() ->where($column, $value, $operator) ->andClause() ->where($column, $value, $operator)