Hi Guys..

I need to read all of the rows from a MySQL table and return only the results that start with a user input letter. So like if the user types in Andrew. I want the database to return all rows that have usernames beginning with the letter a.

Has anyone ever done anything like this before?

Thanks 🙂

    You can use MySQL's LIKE operator for something like this:

    SELECT username FROM users WHERE username LIKE 'a%'
      Write a Reply...