mysql query to search for address or postcode

graninenrei

New Member
Hi I am having difficulties writing a perfect sql query that will search for an address or postcode(english). I stored my postcode as "W1Y TF7". If a user searches using "W1YTF7" (without the space), it does give me any result when it is suppose to return W1Y TF7. VENUE
  • VenueID
  • Name
  • Address1
  • Address2
  • City
  • Postcode
  • PhoneNumer
  • URL
here is my query:\[code\]SELECT DISTINCT * FROM venue WHERE Name LIKE '%$searchValue%' OR Postcode LIKE '%$searchValue%' OR Address2 LIKE '%$searchValue%' OR Postcode LIKE '$searchValue%' \[/code\]
 
Back
Top