PDOStatement (class)
介绍
(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)
这表示已经准备好的语句,并且在语句执行后,生成相关的结果集。
类简介
PDOStatement implements Traversable {
/* Properties */
readonly string $queryString;
/* Methods */
public bool bindColumn ( mixed $column , mixed &$param [, int $type [, int $maxlen [, mixed $driverdata ]]] )public bool bindParam ( mixed $parameter , mixed &$variable [, int $data_type = PDO::PARAM_STR [, int $length [, mixed $driver_options ]]] )public bool bindValue ( mixed $parameter , mixed $value [, int $data_type = PDO::PARAM_STR ] )public bool closeCursor ( void )public int columnCount ( void )public void debugDumpParams ( void )public string errorCode ( void )public array errorInfo ( void )public bool execute ([ array $input_parameters ] )public mixed fetch ([ int $fetch_style [, int $cursor_orientation = PDO::FETCH_ORI_NEXT [, int $cursor_offset = 0 ]]] )public array fetchAll ([ int $fetch_style [, mixed $fetch_argument [, array $ctor_args = array() ]]] )public mixed fetchColumn ([ int $column_number = 0 ] )public mixed fetchObject ([ string $class_name = "stdClass" [, array $ctor_args ]] )public mixed getAttribute ( int $attribute )public array getColumnMeta ( int $column )public bool nextRowset ( void )public int rowCount ( void )public bool setAttribute ( int $attribute , mixed $value )public bool setFetchMode ( int $mode )}
属性
queryString
使用字符串查询功能
目录
- PDOStatement :: bindColumn - 将列绑定到PHP变量
- PDOStatement :: bindParam - 将参数绑定到指定的变量名称
- PDOStatement :: bindValue - 为参数绑定一个值
- PDOStatement :: closeCursor - 关闭游标,使语句再次执行。
- PDOStatement :: columnCount - 返回结果集中的列数
- PDOStatement :: debugDumpParams - 转储SQL准备的命令
- PDOStatement :: errorCode - 获取与语句句柄上最后一个操作关联的SQLSTATE
- PDOStatement :: errorInfo - 获取与语句句柄上最后一个操作关联的扩展错误信息
- PDOStatement :: execute - 执行准备好的语句
- PDOStatement :: fetch - 从结果集中获取下一行
- PDOStatement :: fetchAll - 返回一个包含所有结果集行的数组
- PDOStatement :: fetchColumn - 从结果集的下一行返回单个列
- PDOStatement :: fetchObject - 获取下一行并将其作为对象返回。
- PDOStatement :: getAttribute - 检索语句属性
- PDOStatement :: getColumnMeta - 返回结果集中列的元数据
- PDOStatement :: nextRowset - 进入多行集合语句句柄中的下一行集合
- PDOStatement :: rowCount - 返回最后一条SQL语句影响的行数
- PDOStatement :: setAttribute - 设置语句属性
- PDOStatement :: setFetchMode - 为此语句设置默认的获取模式
← PDO::setAttribute
PDOStatement::bindColumn →
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

