php code for searching data alphabetically from MySQL database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bethifUL13
    New Member
    • Dec 2011
    • 6

    php code for searching data alphabetically from MySQL database

    Hi, I am currently developing a website for our school project that is connected to the mySQL database. I am now creating a search page that will display the title of research papers stored in the database.
    When I click the letter 'A', it should display all the titles starting in letter 'A' that is stored in the database. What is the right code for that? thanks in advance.
    :D
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You can use the LIKE operator with the appropriate WILDCARD in your SQL.

    Comment

    • bethifUL13
      New Member
      • Dec 2011
      • 6

      #3
      thanks .. i'll try it

      Comment

      • bethifUL13
        New Member
        • Dec 2011
        • 6

        #4
        can you give sample code for that? tnx :)

        Comment

        • mansour indinga
          New Member
          • Jan 2012
          • 2

          #5
          give me some sample of program

          Comment

          • mansour indinga
            New Member
            • Jan 2012
            • 2

            #6
            can you give an sample about library borrowing system using MSAccess

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              Code:
              SELECT *
              FROM someTable
              WHERE someField LIKE 'The%'

              Comment

              Working...