You are here: Re: !Need advice from other PHP developers. « All PHP « IT news, forums, messages
Re: !Need advice from other PHP developers.

Posted by Toby A Inkster on 02/05/07 09:48

Eric Layman wrote:

> [Open Connection]
> [declare 2D array]
> [loop thru recordset]
> [2D array] = [data]
> [recordset.close]
> [end loop]
> [Close connection]

After this, all your data is now stored in $2dArray, using up memory. If
you loop through the recordset, reading one line at a time and outputting,
you use less memory. For small bits of data, that's unlikely to be a
problem though.

By the way, you may want to put more consideration into your message
subject lines in future. "!Need advice from other PHP developers." could
easily apply to 90% of the messages to this group. A more specific subject
line which may help clue readers in to what your post will be about would
have been "Caching SQL results into an array" or somesuch.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

 

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

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