Solved

Select where only a portion of the string is known.

Posted on 2012-03-11
2
384 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
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

776 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