Jump to content

Need to store search results + advice


raveyd

Recommended Posts

I am planning to add a search facility on a property locator site that is planned to work as follows:

 

1) Seach Words + post code entered by user.

2) The main table is queried using a FULLTEXT Search (based on posted words)

3) Each record retrieved has the distance calculated.

4) The records are now sorted into Best Match + Closest Distance order

5) Results are paginated at 20 Records per page.

 

The problem that I can't get my head around is where to store that results data so that the user can go from page to page.

 

The site is not large at the moment but potentially could have thousands of results..

 

Any advice would me most appreciated..

Link to comment
Share on other sites

You dont. Take a look at some pagination tutorials. You repeat the query on each page, using differant parameters for the LIMIT clause based on the page number. Of course, you'll need to pass what is being searched for from page to page to repeat the query though

Link to comment
Share on other sites

I don't feel that this would work for me, because after I query the records I then run a second process by ordering them into closest Distance order (based on a post code)

Doesn't change anything... you still can use LIMIT with an offset.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.