开发者

mysqli method calling order

I know that from the php manual that bind_result must be afte开发者_如何学JAVAr execute and prior to calling fetch.

Ide like to know where or if where the correct order to place store_result currently i have being calling pria to bind_results.

$psl -> execute();
$psl -> store_result(); // ?
$psl -> bind_result($val);
$psl -> fetch();

Thanks


You must call store_result() after calling execute() if you wish to retrieve the number of rows returned from the query. See this for more information:

http://www.php.net/manual/en/mysqli-stmt.num-rows.php

To clarify, I have always called store_result() just after calling execute(). I am not sure if you can call it after binding the results, but perhaps someone else will be able to clarify that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜