Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL HELP

Status
Not open for further replies.

sane79

MIS
Nov 18, 2003
60
SG
Hi pple..

I have 3 fields in my MySQL Table:
Record No 1
Add1: 100
Add2: #12-30
Add3: Bradford Avenue

I need an SQL statement that can help me do exact word searching.
Assuming the user just keys in the full address: 100, #12-30 Bradford Avenue, the query should retrieve the record with this address(taking in mind the user may add in new punctuations such as comma, etc)

How do I go abt doing this?
 
For exact word searching use like: say user enter address to text1. I belive even if there is a comma it will work

Select from Table where address1 like '" & text1.text &"'
 
or you can get rid off , before send it to database
 
Hi Abaka,

But add1+add2+add3 would make up the FULL address, which is what the user keys in....

so assuming the user keys in Add1: 100 #12-30 Bradford Avenue in text1...
How do I search thru all my 3 fields in MYSQL to find the exact match?
 
User entering all three fields in a text box so the problem is to send a query to get all address:
You may create one field ad4 in the Db. Just add all add1+ad2+ad3 and everything in one field.(not a good solution)
or Just add a single field ad1 add all the field
Else create the user interface only to enter certain part of the address say (ad1);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top