You are here: Re: Confused by mysqli « PHP Programming Language « IT news, forums, messages
Re: Confused by mysqli

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация