Hello,

I'm hoping to get a few good ideas on the best way to perform a search of
PHP results.

Currently I have a page that returns a list of collapsed customer data:

Example
+ John Smith
+ Jane Doe
+ Robert Jones
+ Dale Bennett

If the user clicks on a customer name it will expand the selection:

Example
 - John Smith
  - 123 Anywhere Street
  - myCity
  - myState
  - myZipcode
  - myWebsite
+ Jane Doe
+ Robert Jones
+ Dale Bennett

Now, what my client wants is a Search functionality that will allow him to
type in myState and have the application automatically expand and focus on
the first match. Then, be able to click "Next" and have it collapse the
first result and expand the next result that contains the same state.

Any ideas?

I was thinking that maybe I would have to create a temp table so it could be
searched against, but I'm not sure if that is the best idea.  Also, in order
to save processing time, the way I made the above expanding/collapsing list
is I don't not pull in the customer details intially but instead run a query
and get the details when the name is clicked for expansion.  This is because
there could be potentially 1,000's of result and getting all of the names
and all of the details at page load would 1) take longer than a user is
willing to wait 2) exceed the timeout 3) exceed the memory allocation

Thanks for any help/ideas.

Dan

Reply via email to