dev rstoetter cSmartSqlStatement cSmartSqlStatement::SetOrderByClause() - rstoetter/csmartsqlstatement-php GitHub Wiki

Method SetOrderByClause( ) - of API Reference dev

 public   mixed rstoetter\cSmartSqlStatement\cSmartSqlStatement::SetOrderByClause(string $str_order_by)
  • Namespace : rstoetter\cSmartSqlStatement
  • Class name: cSmartSqlStatement
  • This method is defined by the class rstoetter\cSmartSqlStatement\cSmartSqlStatement

The method SetOrderByClause( ) sets a new ORDER BY clause The whole statement will be rescanned

Example: $obj_sql_statement = new cSmartSqlStatement('select'); $query = "select * from tbl where x= 5 and z = sqrt( v ) "; $obj_sql_statement->ScanStatement( $query ); $obj_sql_statement->SetOrderBy( 'c desc,d' ); *

Arguments

  • $str_order_by string - <p>the new ORDER BY</p>