raveyd Posted July 29, 2007 Share Posted July 29, 2007 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.. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 29, 2007 Share Posted July 29, 2007 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 Quote Link to comment Share on other sites More sharing options...
raveyd Posted July 29, 2007 Author Share Posted July 29, 2007 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) Quote Link to comment Share on other sites More sharing options...
fenway Posted July 31, 2007 Share Posted July 31, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.