Posted by Dodger on 07/05/06 11:15
David Haynes wrote:
> Dodger wrote:
> [snip]
> The store->result() method returns a mysqli_result type.
> You need to use the mysqli_type for the fetch_assoc() method.
Thank you!
Though pardon my saying that that's weird as snake shoes...
Result objects... *blinks*
> $cities = array();
> while( $city = $result->fetch_assoc() ) {
> $cities[] = $city; // you don't need to supply the $i++ index this way
> }
I think ... I think I'm gonna end up writing function push {} -- to
preserve my sanity by doing that bit elsewhere hidden away...
> $result->free(); // don't forget to free the result memory
Is there a way to lexically scope things, something like my() in
Perl... so the garbage handling bit can be taken care of automagically
when things fall out of scope?
Navigation:
[Reply to this message]
|