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.
精彩评论