PHP Conference Japan 2024

TableUpdate::orderby

(沒有版本資訊,可能只在 Git 中)

TableUpdate::orderby設定排序條件

說明

公開 mysql_xdevapi\TableUpdate::orderby(混合 $orderby_expr, 混合 ...$orderby_exprs): mysql_xdevapi\TableUpdate

設定排序條件。

參數

orderby_expr

定義排序條件的表達式。可以是一個包含一個或多個表達式的陣列,或是一個字串。

orderby_exprs

額外的 sort_expr 參數。

回傳值

TableUpdate 物件。

範例

範例 #1 mysql_xdevapi\TableUpdate::orderby() 範例

<?php
$session
= mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$schema = $session->getSchema("addressbook");
$table = $schema->getTable("names");

$res = $table->update()
->
set('level', 3)
->
where('age > 15 and age < 22')
->
limit(4)
->
orderby(['age asc','name desc'])
->
execute();
?>
新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top