SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: seach script

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    seach script

    I am looking for a search script or create my own that would search the table of
    articles in my database and if it finds a match, I want it to display 20 letters before the word found and 20 letters after. How can I do that ? How do I start ?
    DatingTalk.net - Get advice on dating and relationships

  2. #2
    SitePoint Enthusiast Aarakast's Avatar
    Join Date
    Feb 2005
    Location
    Germany
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you wan't to do that script by yourself, you should look at the SQL-"function" LIKE:
    Code:
    SELECT `title` FROM `table` WHERE `content` LIKE '%searchword%'
    Aarakast
    Greets,
    Pablo

    aarakast.de

  3. #3
    SitePoint Addict liquidautumn's Avatar
    Join Date
    Nov 2002
    Location
    Kharkov, Ukraine
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    start with learning FULLTEXT indexes

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, I will look into it.
    DatingTalk.net - Get advice on dating and relationships

  5. #5
    SitePoint Enthusiast Aarakast's Avatar
    Join Date
    Feb 2005
    Location
    Germany
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the advantage of FULLTEXT!?
    Greets,
    Pablo

    aarakast.de


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
  •