Welcome Guest, Not a member yet? Register   Sign In
like_having() for active record
#1

[eluser]BlueCamel[/eluser]
Can we get a like() function for the HAVING clause in active record? Maybe we could rename the existing or_like() and like() to or_where_like() and where_like() then add or_having_like() and having_like() functions?

I'm not sure about SQL standards, but in MySQL at least it's perfect valid to write HAVING col like '%foo%'.
#2

[eluser]xwero[/eluser]
having can take the same conditions as where so maybe it would have the same methods as the latter. To keep the api small my Compress AR where methods suggestion could come in handy. The where, or_where, having and or_having can be interface methods for _where_conditions that delegates the conditions to the appropriate arrays.




Theme © iAndrew 2016 - Forum software by © MyBB