Re: mysqli_stmt_bind_result
| From: | Georg Richter | Date: | Tue, 19 Jul 2005 19:23:56 +0000 |
| Subject: | Re: mysqli_stmt_bind_result | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39958@lists.php.net to get a copy of this message | ||
Am So, den 10.07.2005 schrieb d3vnull um 12:06:
>
> According to the PHP manual it's quite normal that the above throws an error
> message, because mysqli_stmt_bind_result() expects one variable for each
> database field that you selected. If you just select a few fields from your
> database that's perfectly ok, but if you select something like 20 fields
> this can be really annoying.
> Is there a way to make the above work like in the "old" version, meaning
> fetching the result of mysqli_stmt_execute() into into an array that has its
> indices automagically named like the according database fields just like
> mysql_fetch_array() does?
>
If you want to implement a similiar behaviour you should do that in
userland code, by retrieving metadata, initializing an array with
fieldnames as keys and using call_user_func_array function.
/Georg