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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spaces in like query

Status
Not open for further replies.

tcardoso

Programmer
Jan 31, 2005
56
PT
Hi,

this query:
Code:
SELECT * FROM `table` WHERE `field` like '%Some Name%'

give me empty result

and this one
Code:
SELECT * FROM `table` WHERE `field` like '%Some%Name%'

gives me the "Some Name" Guy :( Why does spaces aren't working?

Thanks
 
I suspect that you either have two or more spaces in your SQL query between Some and Name or your data has two or spaces between Some and Name.

It is possible that another type of white space character is there but I suggest this less probable.

Andrew
Hampshire, UK
 
lol.... sorry for that, my "newbiece".

damm user, put two spaces under is name and wasn't appearing on search for others :p

Thanks mate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top