FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Query or Array functions
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Query or Array functions [message #176963 is a reply to message #176962] Fri, 10 February 2012 11:32 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Thomas 'PointedEars' Lahn wrote:

> 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.

<http://php.net/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, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 6 line php 2 asp
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 01:56:07 GMT 2024

Total time taken to generate the page: 0.04490 seconds