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

Method AddOrderByClause( )

 public   mixed rstoetter\cSmartSqlStatement\cSmartSqlStatement::AddOrderByClause(string $str_clause)

The method AddOrderByClause( ) adds a new ORDER BY clause to the existing ORDER BY The whole statement will be rescanned

Example: $obj_sql_statement = new cSmartSqlStatement('select'); $query = "select * from tbl order by a, b asc "; $obj_sql_statement->ScanStatement( $query ); $obj_sql_statement->AddOrderByClause( ' h, s asc' );

Arguments

  • $str_clause string - <p>the ORDER BY elements to add</p>