SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Searching a DB on multiple terms, yet only returning specific results

    'kay, I have a scenario where I would like to search a database which will contain lists of multiple items, say a list like this:

    ItemOne
    ItemTwo
    ItemThree
    ItemFour

    What I need to create is a system whereby a user can add in what items they have. And they will be given a list of all database records that meet that criteria. But ONLY that. For instance, I don't want someone to enter "ItemOne, ItemThree" and still be returned the row containing the above example list, I only want that particular record returning if the user inputs each record in the list.

    Oh yeah, and the terms might not exactly match either.

    So really I'm trying to come up with both a way of storing the stored list, and a way of making an item-for-item comparison on loose term matching. So if anyone has any suggestions than thats great.

    Alternatively you could tell me its impossible and save me pain.

  2. #2
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use a separate table.

    As far as "loose matching", can you elaborate? Do you mean stemming?
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  3. #3
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I mean words that may not be spelled exactly the same way.

  4. #4
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Table lists
    Table items (keyed to lists, many to one)
    Table mis-spellings(keyed to items, many to one)

    I think you'd have to generate the mis-spellings manually. The only other way I can think of is running a dictionary file through something that checks the soundex of every word and sees if it matches the soundex of an item.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure


Bookmarks

Posting Permissions

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