Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4779

Re: Query or Array functions

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="UTF-8"
Message-ID <3146703.zuxlfSeGin@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <php@PointedEars.de>
Organization PointedEars Software (PES)
Date Fri, 10 Feb 2012 12:06:52 +0100
User-Agent KNode/4.4.11
Content-Transfer-Encoding 8Bit
Subject Re: Query or Array functions
Newsgroups comp.lang.php
References <jh1ra7$or4$1@dont-email.me>
Followup-To comp.lang.php
MIME-Version 1.0
Lines 27
NNTP-Posting-Date 10 Feb 2012 12:06:53 CET
NNTP-Posting-Host 12737b4d.newsspool3.arcor-online.net
X-Trace DXC=fIjNlPQdZ7BAa;:RKVJ>LEMcF=Q^Z^V3H4Fo<]lROoRA8kF<OcfhCOKGGYUYI]Zj9NDZm8W4\YJNLb@mF9jNikdEUP2PQL>`[aF1XCem`]W@YO
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:4779

Followups directed to: comp.lang.php

Show key headers only | View raw


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

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Query or Array functions Scott Johnson <noonehome@chalupasworld.com> - 2012-02-09 17:18 -0800
  Re: Query or Array functions Michael Fesser <netizen@gmx.de> - 2012-02-10 02:39 +0100
    Re: Query or Array functions Scott Johnson <noonehome@chalupasworld.com> - 2012-02-10 05:54 -0800
      Re: Query or Array functions Jerry Stuckle <jstucklex@attglobal.net> - 2012-02-10 09:26 -0500
  Re: Query or Array functions "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-10 09:26 +0100
    Re: Query or Array functions Scott Johnson <noonehome@chalupasworld.com> - 2012-02-10 06:01 -0800
    Re: Query or Array functions "Peter H. Coffin" <hellsop@ninehells.com> - 2012-02-11 11:20 -0600
  Re: Query or Array functions "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-02-10 11:12 +0100
  Re: Query or Array functions Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-10 02:44 -0800
    Re: Query or Array functions Scott Johnson <noonehome@chalupasworld.com> - 2012-02-10 06:01 -0800
      Re: Query or Array functions Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-10 06:11 -0800
      Re: Query or Array functions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 00:03 +0100
        Re: Query or Array functions Gregor Kofler <usenet@gregorkofler.com> - 2012-02-11 11:03 +0100
          Re: Query or Array functions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 12:06 +0100
  Re: Query or Array functions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-10 12:06 +0100
    Re: Query or Array functions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-10 12:32 +0100
    Re: Query or Array functions Scott Johnson <noonehome@chalupasworld.com> - 2012-02-10 05:43 -0800

csiph-web