Solved

Select where only a portion of the string is known.

Posted on 2012-03-11
2
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
MrHswede earned 500 total points
ID: 37707613
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
ID: 37707627
Yes,  I ended up using LIKE
"SELECT * FROM members WHERE mem_first_name LIKE '$search%'"
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

707 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