(沒有可用的版本資訊,可能只在 Git 中)
RowResult::__construct — RowResult 建構函式
表示從查詢資料庫獲得的結果集。
此函式沒有參數。
範例 #1 mysql_xdevapi\RowResult::__construct() 範例
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$schema = $session->getSchema("addressbook");
$table = $schema->getTable("names");
$row = $table->select('name', 'age')->where('age > 18')->execute()->fetchAll();
print_r($row);
以上範例會輸出類似以下的內容
Array ( [0] => Array ( [name] => John [age] => 42 ) [1] => Array ( [name] => Sam [age] => 33 ) )