orderBy() public method

public orderBy ( array $columnNames )
$columnNames array
示例#1
0
 public function testOrderByColumns()
 {
     $q = new AlterTableQuery('products');
     $q->orderBy(['name', 'description', 'created_on', 'created_by']);
     $this->assertDriverQuery(new MySQLDriver(), $q);
     $this->assertSqlStrings($q, [[new MySQLDriver(), 'ALTER TABLE `products` ORDER BY `name`,`description`,`created_on`,`created_by`']]);
 }