cSmartSqlStatement::AddHavingClause() - rstoetter/csmartsqlstatement-php GitHub Wiki

Method AddHavingClause( )

 public   mixed rstoetter\cSmartSqlStatement\cSmartSqlStatement::AddHavingClause(string $str_having)

The method AddHavingClause( ) adds a new HAVING clause to the existing HAVING The whole statement will be rescanned

Example: $obj_sql_statement = new cSmartSqlStatement('select'); $query = "select * from tbl group by a, b having h=5 * 12 / w limit 12"; $obj_sql_statement->ScanStatement( $query ); $obj_sql_statement->AddHavingClause( '( x = sqrt(a) , s = 17 , z=o)' );

Arguments

  • $str_having string - <p>the HAVING elements to add</p>