Oci预处理语句¶
| 属性 | 值 |
|---|---|
| 命名空间 | fize\db\realization\oracle\mode\driver\oci |
| 类名 | Statement |
| 属性: |
|---|
| 名称 | 说明 |
|---|---|
| mode | 执行模式 |
| 方法: |
|---|
| 方法名 | 说明 |
|---|---|
| __construct() | 构造 |
| __destruct() | 析构时释放预处理语句 |
| prototype() | 返回资源原型,用于原始操作 |
| bindArrayByName() | 将PHP数组var_array绑定到Oracleplaceholder名称,该名称指向Oracle PL/SQLarray。它是用于输入还是用于输出将在运行时确定。 |
| bindByName() | 绑定一个 PHP 变量到一个 Oracle 位置标志符 |
| cancel() | 中断游标读取数据 |
| defineByName() | 在 SELECT 中使用 PHP 变量作为定义的步骤 |
| execute() | 执行一条语句 |
| fetchAll() | 获取结果数据的所有行到一个数组 |
| fetchArray() | 以关联数组或数字数组的形式返回查询的下一行 |
| fetchAssoc() | 以关联数组的形式返回查询的下一行 |
| fetchObject() | 以对象形式返回查询的下一行 |
| fetchRow() | 以数字数组的形式返回查询的下一行 |
| fetch() | 获取下一行(对于 SELECT 语句)到内部结果缓冲区。 |
| fieldIsNull() | 检查字段是否为 NULL |
| fieldName() | 返回与字段数字索引(从 1 开始)相对应的字段名 |
| fieldPrecision() | 返回字段精度 |
| fieldScale() | 返回字段范围 |
| fieldSize() | 返回字段大小 |
| fieldTypeRaw() | 返回字段的原始 Oracle 数据类型 |
| fieldType() | 返回字段的数据类型 |
| freeStatement() | 释放预备语句 |
| getImplicitResultset() | 从具有Oracle数据库12c隐式结果集的父语句资源中返回下一个子语句资源 |
| numFields() | 返回结果列的数目 |
| numRows() | 返回语句执行后受影响的行数 |
| result() | 返回所取得行中字段的值 |
| setPrefetch() | 设置预提取行数 |
| statementType() | 返回 OCI 语句的类型 |
方法¶
__construct()¶
构造
public function __construct (
resource &$statement,
int $mode = null
)
| 参数: |
|
|---|
bindArrayByName()¶
将PHP数组var_array绑定到Oracleplaceholder名称,该名称指向Oracle PL/SQLarray。它是用于输入还是用于输出将在运行时确定。
public function bindArrayByName (
string $name,
array &$var_array,
int $max_table_length,
int $max_item_length = -1,
int $type = 96
) : bool
| 参数: |
|
|---|
bindByName()¶
绑定一个 PHP 变量到一个 Oracle 位置标志符
public function bindByName (
string $bv_name,
mixed $variable,
int $maxlength = -1,
int $type = 1
) : bool
| 参数: |
|
|---|
defineByName()¶
在 SELECT 中使用 PHP 变量作为定义的步骤
public function defineByName (
string $column_name,
mixed &$variable,
int $type = null
) : bool
| 参数: |
|
|---|
fetchAll()¶
获取结果数据的所有行到一个数组
public function fetchAll (
array &$output,
int $skip = 0,
int $maxrows = -1,
int $flags = 16
) : int
| 参数: |
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 返回值: | 失败时返回false |
fetchArray()¶
以关联数组或数字数组的形式返回查询的下一行
public function fetchArray (
int $mode = 3
) : array
| 参数: |
|
|---|
fieldIsNull()¶
检查字段是否为 NULL
public function fieldIsNull (
mixed $field
) : bool
| 参数: |
|
|---|
fieldName()¶
返回与字段数字索引(从 1 开始)相对应的字段名
public function fieldName (
int $field
) : string
| 参数: |
|
|---|
fieldPrecision()¶
返回字段精度
public function fieldPrecision (
int $field
) : int
| 参数: |
|
|---|
fieldTypeRaw()¶
返回字段的原始 Oracle 数据类型
public function fieldTypeRaw (
int $field
) : int
| 参数: |
|
|---|
getImplicitResultset()¶
从具有Oracle数据库12c隐式结果集的父语句资源中返回下一个子语句资源
public function getImplicitResultset () : $this|bool
| 返回值: | 没有下一个语句时返回false |
|---|