Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2932196.cVuretnY5P@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 10 Feb 2012 12:32:32 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Query or Array functions Newsgroups: comp.lang.php References: <3146703.zuxlfSeGin@PointedEars.de> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 34 NNTP-Posting-Date: 10 Feb 2012 12:32:33 CET NNTP-Posting-Host: 12737b4d.newsspool3.arcor-online.net X-Trace: DXC=CXFOAX<]n9BWDmlTRbh@=IMcF=Q^Z^V3H4Fo<]lROoRA8kF Scott Johnson wrote: >> What I was thinking of doing is loading the full record set into an >> array and then filter out the array of the needed data as the user types. > > That might be feasible if the original data was not modified after > retrieval and it was not too large for the client system to process. > In all other cases you want to do the filtering server-side. That is, in the database query (`… WHERE …'). If you do not want to rely on the client-side (i. e., have it to work without XHR as well) and do not care if your displayed data reflects that currently in the database, you could also store the unfiltered query result in the session, provided your session storage can grow large enough without a relevant performance penalty on access. >> I have not done any intense array manipulations like this before and am >> wondering if this seems like a practical approach. > > You would not be manipulating *PHP* arrays (but see above), so … If you would store the query result as a PHP array in $_SESSION, then you could use PHP array filtering functions on the array element of $_SESSION. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,