mysqli函数bind

编程入门 行业动态 更新时间:2024-10-26 15:22:35
本文介绍了mysqli函数bind_result,store_result和fetch之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在mysqli_stmt_execute 之后知道什么时候打电话给我遇到了麻烦 你怎么知道什么时候打电话

I'm running into problems knowing when and what to call after mysqli_stmt_execute How do you know when to call

  • mysqli_stmt_bind_result
  • mysqli_stmt_store_result
  • mysqli_stmt_fetch
  • 推荐答案

    mysqli_stmt_bind_result()告诉mysqli在获取行时要填充哪个变量,但还没有fetch()任何东西.在调用提取之前,必须先调用一次.

    mysqli_stmt_bind_result() tells mysqli which variable you want to be populate when you fetch a row, but it doesn't fetch() anything yet. This is necessary to call once, before you call fetch.

    mysqli_stmt_store_result()设置了一个可选行为,以便客户端在您fetch()第一行时下载所有行,并将整个结果集缓存在客户端(即PHP)中.随后的fetch()调用将简单地对此客户端缓存的结果集进行迭代.但是设置此选项本身也不会导致fetch().此功能是完全可选的.

    mysqli_stmt_store_result() sets an optional behavior so that the client downloads all rows when you fetch() the first row, and caches the whole result set in the client (i.e. PHP). Subsequent fetch() calls will simply iterate over this client-cached result set. But setting this option itself does not cause a fetch() yet either. This function is totally optional.

    mysqli_stmt_fetch()返回结果集中的下一行,并将其存储在绑定变量中.您必须为结果集的每一行循环调用此函数.也就是说,直到提取返回false为止.

    mysqli_stmt_fetch() returns the next row in the result set, and causes it to be stored in a bound variable. You must call this function in a loop, for each row of the result set. That is, until the fetch returns false.

    更多推荐

    mysqli函数bind

    本文发布于:2023-11-14 19:06:56,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1588281.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:函数   mysqli   bind

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!