Solved

Select where only a portion of the string is known.

Posted on 2012-03-11
2
373 Views
Last Modified: 2012-03-11
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
Comment
Question by:Luey
2 Comments
 
LVL 3

Accepted Solution

by:
MrHswede earned 500 total points
Comment Utility
I am not sure for my sql, perhaps there is a like clause?

Select *
from y
Where itype like '1234%'

Regards
Martin
0
 

Author Closing Comment

by:Luey
Comment Utility
Yes,  I ended up using LIKE
"SELECT * FROM members WHERE mem_first_name LIKE '$search%'"
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now