5 replies
  • WEB DESIGN
  • |
How do I add a search function to my website that has all the letters of the alphabet listed and allows me to search by the first letter of the alphabet?
#letter #search
  • Profile picture of the author Bruce Hearder
    Originally Posted by tish_lynn02 View Post

    How do I add a search function to my website that has all the letters of the alphabet listed and allows me to search by the first letter of the alphabet?
    It depends a bit on what type of database your website is running.
    If you are using mySQL with say Wordpress, then its not going to be easy.

    The default setting for mySQL is that it wont search for anything that is less than 4 chars in width. So no point searching for BMW, because it wont find anything.

    A way to do this would be to create 26 categories (A to Z) and put your conetnt into those categories when you make it.

    I know its now the most dynamic/hip solutions but it does work very well..

    Take care and hope this gives you some food for thought

    Bruce
    {{ DiscussionBoard.errors[3506471].message }}
    • Profile picture of the author RyanAndrews
      Sounds more like sorting or pattern matching, than true fulltext searching.

      For example, to find every name beginning with A:
      SELECT * FROM table WHERE name REGEXP '^A';
      {{ DiscussionBoard.errors[3506756].message }}
  • Profile picture of the author Big Squid
    What's the end result of what you're trying to do?
    {{ DiscussionBoard.errors[3507383].message }}
    • Profile picture of the author tish_lynn02
      Originally Posted by Big Squid View Post

      What's the end result of what you're trying to do?
      have a search function on my website where you 'find by letter' and all the letters of the alphabet are listed and hyperlinked to a page that contains all the posts on my site that begin with that letter.
      {{ DiscussionBoard.errors[3520891].message }}
      • Profile picture of the author RyanAndrews
        So to rephrase that: You want to categorize your posts alphabetically. :confused:
        {{ DiscussionBoard.errors[3522639].message }}

Trending Topics