Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: FAQ with Search

  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post FAQ with Search

    Hi guys,

    I am creating an FAQ for my site and I want people to be able to do a text search for specific FAQs containing that word or phrase and then to display the results of the search.

    - What would be the best way of storing the FAQs considering I want to search them and also that I want to be able to have different section for the FAQs.

    - Also what is the best way of implementing the search function?

    Thank you for any help you can provide guys.

    Joe

  • #2
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    1: In a database. Use a category table to store different 'sections'. Link them up with a foreign key.

    2: Depends on your situation. If using MySQL, there's the fulltext capability (google 'mysql fulltext').

  • #3
    New Coder
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Wicked, thank you aedrin, have not really used the advanced functions of Database's but am assuming a category table is relatively easy.

  • #4
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    FAQ table:
    id
    question
    answer
    category_id

    Category table:
    id
    name

    List of all FAQs with their category, sorted by category:
    SELECT faq.*, category.name FROM faq, category WHERE faq.category_id = category.id SORTY BY category.id ASC

  • #5
    New Coder
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Brilliant Ty


  •  

    Posting Permissions

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