本文整理匯總了PHP中ResultSet::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ResultSet::__construct方法的具體用法?PHP ResultSet::__construct怎麽用?PHP ResultSet::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ResultSet
的用法示例。
在下文中一共展示了ResultSet::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result, TimeZone $tz = NULL)
{
$fields = array();
if (is_object($result)) {
while ($field = $result->fetch_field()) {
$fields[$field->name] = $field->type;
}
}
parent::__construct($result, $fields, $tz);
}
示例2: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result, TimeZone $tz = NULL)
{
$fields = array();
if (is_resource($result)) {
for ($i = 0, $num = pg_num_fields($result); $i < $num; $i++) {
$fields[pg_field_name($result, $i)] = pg_field_type($result, $i);
}
}
parent::__construct($result, $fields, $tz);
}
示例3: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result, TimeZone $tz = NULL)
{
$fields = array();
if (is_resource($result)) {
foreach (sqlsrv_field_metadata($result) as $meta) {
$fields[$meta['Name']] = $meta;
}
}
parent::__construct($result, $fields, $tz);
}
示例4: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result, TimeZone $tz = NULL)
{
$fields = array();
if (is_resource($result)) {
for ($i = 0, $num = mssql_num_fields($result); $i < $num; $i++) {
$field = mssql_fetch_field($result, $i);
$fields[$field->name] = $field->type;
}
}
parent::__construct($result, $fields, $tz);
}
示例5: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result)
{
$fields = array();
if (is_resource($result)) {
for ($i = 0, $num = sqlite_num_fields($result); $i < $num; $i++) {
$fields[sqlite_field_name($result, $i)] = FALSE;
// Types are unknown
}
}
parent::__construct($result, $fields);
}
示例6: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result)
{
$fields = array();
if ($result instanceof SQLite3Result) {
for ($i = 0, $num = $result->numColumns(); $i < $num; $i++) {
$fields[$result->columnName($i)] = $result->columnType($i);
// Types are unknown
}
}
parent::__construct($result, $fields);
}
示例7: __construct
/**
* Constructor
*
* @param resource handle
*/
public function __construct($result, TimeZone $tz = NULL)
{
$fields = array();
if (is_resource($result)) {
for ($i = 0, $num = ibase_num_fields($result); $i < $num; $i++) {
$field = ibase_field_info($result, $i);
$fields[$field['name']] = $field['type'];
}
}
parent::__construct($result, $fields, $tz);
}
示例8: __construct
/**
* Constructor
*
* @param array<string, mixed>[] data
*/
public function __construct($data = array())
{
$s = sizeof($data);
parent::__construct($s, $s ? array_keys($data[0]) : array());
$this->data = $data;
}