Loading ...
Sorry, an error occurred while loading the content.

Re: [bang-phpug] search in alphabetical order

Expand Messages
  • Sudheer Satyanarayana
    ... The answer is in your question. :) When you click on A, make a query such that it retrieves elements from database that start with A. Okay, let s break the
    Message 1 of 3 , Mar 23, 2012
    • 0 Attachment
      On Friday 23 March 2012 06:29 PM, vijaya lakshmi wrote:
      >
      > hi,
      >
      > Please guide me on how to code to search elements from database
      > in alphabetical order.
      >
      > If we click on A all items starting from A get displayed.
      >
      The answer is in your question. :)

      When you click on A, make a query such that it retrieves elements from
      database that start with A.

      Okay, let's break the problem down into pieces.
      1. Make 26 links labeled A through Z. In the generated URL, have a GET
      parameter to indicate the label. For example:
      example.com/mypage?selected_alphabet=D
      2. Use the selected alphabet in your query.
      "SELECT my_column FROM my_table WHERE my_search_column LIKE '?%'",
      $_GET['selected_alphabet']
      3. Print the returned result.

      You will have to think through the steps. Key points you have to
      consider are:
      1. How to retrieve the information from the database given an alphabet.
      2. How to generate the alphabet links. There are many styles of doing
      it. Decide yours.
      3. How to put it all together.


      --

      With warm regards,
      Sudheer. S
      Gavika - http://www.gavika.com
      Personal home page - http://www.sudheer.net/about
      Tech Chorus - http://www.techchorus.net



      [Non-text portions of this message have been removed]
    • Madamchetanji Sundari
      thanks . you will be informed in detail about your query please . thanks and regards . have a nice day . On Fri, Mar 23, 2012 at 6:52 PM, Sudheer
      Message 2 of 3 , Mar 24, 2012
      • 0 Attachment
        thanks . you will be informed in detail about your query please . thanks
        and regards . have a nice day .

        On Fri, Mar 23, 2012 at 6:52 PM, Sudheer Satyanarayana <
        sudheer.s@...> wrote:

        > **
        >
        >
        > On Friday 23 March 2012 06:29 PM, vijaya lakshmi wrote:
        > >
        > > hi,
        > >
        > > Please guide me on how to code to search elements from database
        > > in alphabetical order.
        > >
        > > If we click on A all items starting from A get displayed.
        > >
        > The answer is in your question. :)
        >
        > When you click on A, make a query such that it retrieves elements from
        > database that start with A.
        >
        > Okay, let's break the problem down into pieces.
        > 1. Make 26 links labeled A through Z. In the generated URL, have a GET
        > parameter to indicate the label. For example:
        > example.com/mypage?selected_alphabet=D
        > 2. Use the selected alphabet in your query.
        > "SELECT my_column FROM my_table WHERE my_search_column LIKE '?%'",
        > $_GET['selected_alphabet']
        > 3. Print the returned result.
        >
        > You will have to think through the steps. Key points you have to
        > consider are:
        > 1. How to retrieve the information from the database given an alphabet.
        > 2. How to generate the alphabet links. There are many styles of doing
        > it. Decide yours.
        > 3. How to put it all together.
        >
        > --
        >
        > With warm regards,
        > Sudheer. S
        > Gavika - http://www.gavika.com
        > Personal home page - http://www.sudheer.net/about
        > Tech Chorus - http://www.techchorus.net
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.