suggest query

Reply

Join Date: Jun 2008
Posts: 171
Reputation: praveen_dusari is an unknown quantity at this point 
Solved Threads: 21
praveen_dusari's Avatar
praveen_dusari praveen_dusari is offline Offline
Junior Poster

suggest query

 
0
  #1
Nov 21st, 2008
hi all,
i have a auto suggestion box which displays countries when we type a it will display all countries starting with letter a like alaska,australia etc...,but i want to display every name which has letter a in names like australia,india,
etc...
Failure is success if we learn from it
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 798
Reputation: pritaeas is on a distinguished road 
Solved Threads: 130
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Master Poster

Re: suggest query

 
0
  #2
Nov 21st, 2008
  1. SELECT * FROM countries WHERE country LIKE '%a%'
Last edited by peter_budo; Nov 28th, 2008 at 12:10 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 79
Reputation: varmadba is an unknown quantity at this point 
Solved Threads: 8
varmadba varmadba is offline Offline
Junior Poster in Training

Re: suggest query

 
0
  #3
Dec 1st, 2008
If there are small number of rows in a table u can go with Like '%a%'
else you need to try full text index
:- Varma

We are Happy to inform launch of a new site with loads of database related information Site offers wide range of functionality Forums,Blogs,Articles,Editorials and much more
http://www.sqllibrarian.info/
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC