Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

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

0
Luey
Asked:
Luey
1 Solution
 
MrHswedeCommented:
I am not sure for my sql, perhaps there is a like clause?

Select *
from y
Where itype like '1234%'

Regards
Martin
0
 
LueyAuthor Commented:
Yes,  I ended up using LIKE
"SELECT * FROM members WHERE mem_first_name LIKE '$search%'"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now