Select where only a portion of the string is known.

Is it possible to select from a table where only a portion of the string in a column is known?
Example: I type 1234 in my form field and return all data that starts with 1234.  ie, 123456

"SELECT * FROM members WHERE mem_first_name = '$search'";

Open in new window

Who is Participating?
MrHswedeConnect With a Mentor Commented:
I am not sure for my sql, perhaps there is a like clause?

Select *
from y
Where itype like '1234%'

LueyAuthor Commented:
Yes,  I ended up using LIKE
"SELECT * FROM members WHERE mem_first_name LIKE '$search%'"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.