Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

SQL Driver: Inequality in a HAVING clause

edited February 2012 in Vanilla 2.0 - 2.8

hello!

is there a way to use the vanilla's SQL driver class Where or Having methods with inequalities? E.g. I'd like to run a query containing a "HAVING count(*) > 4". Is there a way to do it with the SQL-Driver's methods?

Best Answer

  • Options
    jspautschjspautsch Themester ✭✭✭
    Answer ✓

    I've never tried aggregations with it, but I think it'd be something like $SQL->Having('count(*)>', '4')

    For inequalities you put the > or < at the end of the first value

Answers

  • Options
    jspautschjspautsch Themester ✭✭✭
    Answer ✓

    I've never tried aggregations with it, but I think it'd be something like $SQL->Having('count(*)>', '4')

    For inequalities you put the > or < at the end of the first value

  • Options

    Yep.

    grep is your friend.

  • Options

    Yeah, that does work. Thank you very much!!!

Sign In or Register to comment.