mysqli_stmt::attr_set()

(PHP 5, PHP 7)

Used to modify the behavior of a prepared statement

说明面向对象风格

mysqli_stmt::attr_set(int$attr,int$mode):bool过程化风格

mysqli_stmt_attr_set(mysqli_stmt$stmt,int$attr,int$mode):bool

Used to modify the behavior of a prepared statement. This function may be called multiple times to set several attributes.

参数$stmt仅以过程化样式:由mysqli_stmt_init()返回的 statement 标识。$attrThe attribute that you want to set. It can have one of the following values:Attribute valuesCharacterDescriptionMYSQLI_STMT_ATTR_UPDATE_MAX_LENGTHSetting to TRUE causes mysqli_stmt_store_result() to update the metadataMYSQL_FIELD->max_lengthvalue.

MYSQLI_STMT_ATTR_CURSOR_TYPEType of cursor to open for statement when mysqli_stmt_execute() is invoked.$modecan beMYSQLI_CURSOR_TYPE_NO_CURSOR(the default)orMYSQLI_CURSOR_TYPE_READ_ONLY.

MYSQLI_STMT_ATTR_PREFETCH_ROWSNumber of rows to fetch from server at a time when using a cursor.$modecan be in the range from 1 to the maximum value of unsigned long. The default is 1.

If you use theMYSQLI_STMT_ATTR_CURSOR_TYPEoption withMYSQLI_CURSOR_TYPE_READ_ONLY, a cursor is opened for the statement when you invoke mysqli_stmt_execute(). If there is already an open cursor from a previous mysqli_stmt_execute() call, it closes the cursor before opening a new one.mysqli_stmt_reset() also closes any open cursor before preparing the statement for re-execution.mysqli_stmt_free_result() closes any open cursor.

If you open a cursor for a prepared statement,mysqli_stmt_store_result() is unnecessary.$modeThe value to assign to the attribute.

参见» Connector/MySQL mysql_stmt_attr_set()This is basically a wrapper for mysql_stmt_attr_set in the MySQL C API: http://dev.mysql.com/doc/refman/5.0/en/mysql-stmt-attr-set.html

mysql stmt attr set_mysqli_stmt::attr_set()相关推荐

  1. 使用jdbc操作mysql数据库_java使用JDBC操作MYSQL数据库

    1.新建数据库 DROP TABLE IF EXISTS `test`.`user`; CREATE TABLE `test`.`user` ( `username` varchar(45) DEFA ...

  2. Spark与Mysql(JdbcRDD)整合开发

    在Spark中提供了一个JdbcRDD类,该RDD就是读取JDBC中的数据并转换成RDD,之后我们就可以对该RDD进行各种的操作.我们先看看该类的构造函数: JdbcRDD[T: ClassTag]( ...

  3. pdo-mysql_PHP: MySQL (PDO) - Manual

    PDO::MYSQL_ATTR_USE_BUFFERED_QUERY (int) Если этот атрибут установлен в true в PDOStatement, MySQL-д ...

  4. PHP MySQL Functions (PDO_MYSQL)

    https://www.php.net/manual/en/ref.pdo-mysql.php MySQL Functions (PDO_MYSQL) 简介 PDO_MYSQL is a driver ...

  5. C++ MySQL存储二进制数据、存储照片

    版权声明:本文为CSDN博主「intfre」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明. 原文链接:https://blog.csdn.net/nibiru_ho ...

  6. php查询mysql表里的数据_PHP/MYSQL 查询大数据/遍历表

    PHP:PHP 5.3.6 (cli) (built: Jun 15 2011 16:29:50) MYSQL:5.1.51 如果我们有的一张表有几百万或几千万的记录,我们要使用 PHP 将所有的记录 ...

  7. HCTF2017-Web-Writeup

    boring website 先通过扫描得到: http://106.15.53.124:38324/www.zip <?php echo "Bob received a missio ...

  8. 【Python学习笔记】36:抓取去哪儿网的旅游产品数据

    学习<Python3爬虫.数据清洗与可视化实战>时自己的一些实践. 书上这章开篇就说了尽量找JSON格式的数据,比较方便解析(在python里直接转换成字典),去哪儿网PC端返回的不是JS ...

  9. mysql 1243_MySQL#1243给予EXECUTE的未知预处理语句处理程序(stmt)

    我在我安装的MySQL版本上关注这个tutorial,但它给我一个错误: SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT( 'MAX(IF(p ...

  10. jsp+servlet+mysql增删改查

    用的IntelliJ IDEA开发的,jdk1.8 1 首先是项目结构,如下图所示 2看各层的代码 首先是web.xml <?xml version="1.0" encodi ...

最新文章

  1. 车辆检测--DAVE: A Unified Framework for Fast Vehicle Detection and Annotation
  2. 20162328蔡文琛 第十周 周五 课上测试
  3. Android GridView的使用方法
  4. 更换Winform 皮肤(上)----使用现有皮肤
  5. 如何将Java应用程序置于Apache HTTP服务器之后
  6. SpringBoot使用@ServerEndpoint无法依赖注入问题解决 SpringBoot webSocket配置
  7. ASP.NET事件顺序
  8. [C#][算法] 用菜鸟的思维学习算法 -- 马桶排序、冒泡排序和快速排序
  9. 百度网盘卸载后,无法重新安装,说电脑中文件没有删除干净
  10. 【nmake】Nmake基本语法和Windows下的makefile.vc编写demo
  11. 样条曲线转换为NUBRS曲线
  12. 什么是网站前端框架?目前常用的网站前端框架都有哪些?
  13. mac如何打开/bin等目录
  14. 值得收藏:程序员必去的社区与网站
  15. 电气工程师软件笔试题
  16. 数学词汇的英译,写文章,读文献必备
  17. Linux Terminal 下工具栏显示设置
  18. ffmpeg各种操作处理
  19. 利用SMB实现局域网共享文件夹
  20. 机器人基础之姿态矩阵

热门文章

  1. L. Collecting Diamonds
  2. 一般纳税人税额计算_一般纳税人应纳税额如何计算?
  3. Android 微信登陆
  4. getlasterror 126
  5. C++关键字(static/register/atuo/extern/volatile/const/inline/define/typedef)
  6. 最小径集的算法_最小割集Stoer-Wagner算法 | 学步园
  7. 关于28379D的X-BAR
  8. 华为当个pl怎么样_华为8PL∪S提示灯 | 手游网游页游攻略大全
  9. 计算机软件著作权申请条件有哪些
  10. Hbase的过滤器分类