Searching databases

Results 1 to 4 of 4

Thread: Searching databases

  1. #1
    Brian K Guest

    Default Searching databases

    I have developed a database which allows users to search for terms. I want any user to be able to view the 20 most recent terms searched for and the 20 most popular.<BR><BR>Does anyone have any idea how to do this.<BR>I tried application variables with arrays, but this didn&#039;t work.<BR><BR>Anyone??<BR>Brian

  2. #2
    Join Date
    Dec 1969

    Default RE: Searching databases

    How about adding a couple of fields to your database, one fore last search time and one for number of searches. When you run the search you could also update the last search time and add 1 to the number of searches?

  3. #3
    Brian K Guest

    Default RE: Searching databases -

    That sounds okay, but I think I might get a problem later on.<BR>I am using several tables, and there might be a mix up on where the terms are. <BR>That is, I want the most recent term to come from which ever table the most recent term is.<BR><BR>This will involve searching thru all tables.<BR><BR>And tables are quite large, making performance slow down.<BR><BR>Any other ideas??<BR>Any one!!<BR>

  4. #4
    Culture Guest

    Default RE: Searching databases

    Might sound obvious but why not create an entirely new table to do this:<BR>Every time someone searches you do a select to check if that one exists - if so update the count of searches and change the last access date to now().<BR>If not then insert a new record with a count of 1 and a search date of now().<BR><BR>This would probably be the most efficent way - i would not hold anything like this in memory - would kill the server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts