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 #176962 is a reply to message #176956] Fri, 10 February 2012 11:06 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
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
--
When all you know is jQuery, every problem looks $(olvable).
[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: Tue Nov 26 23:07:36 GMT 2024

Total time taken to generate the page: 0.04651 seconds