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 #176964 is a reply to message #176962] Fri, 10 February 2012 13:43 Go to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 2/10/2012 3:06 AM, Thomas 'PointedEars' Lahn wrote:
> Scott Johnson wrote:
>
>> The problem I see is the numerous DB queries and I don't see querying
>> the DB each time the user types a letter as a practical approach. (I
>> could be wrong).
>
> You do not have a PHP problem unless you are using PHP client-side. Start a
> client-side timer that must reach zero before the request is made that
> invokes the database query server-side. Reset it when the user types a
> second character into the form control. It has been done before.
>
>> 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.
>
>> 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 …
>
>
> PointedEars

Man I never even considered the possible data change in which with using
preloaded arrays the page would have to be reloaded to update the data.
So that alone is a deal breaker for the array method.

Thanks for the different look.
[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 02:38:34 GMT 2024

Total time taken to generate the page: 0.04528 seconds