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!

What would cause this to stop working?

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

For some reason the following SQL query doesn't want to work any more (its part of an existing program, and has worked on a million other sites);

SQL:
SELECT * FROM Category WHERE Full_Name LIKE "Comercios/_pticas"

The Full_Name it should be matching has:

Comercios/Ópticas

Any ideas why this wouldn't be working?

TIA!

Andy
 
The letter Ó makes the problem. Try
SELECT * FROM Category WHERE Full_Name LIKE "Comercios/$pticas"
 
I meant:
SELECT * FROM Category WHERE Full_Name LIKE "Comercios/%pticas
 
set the connection to use utf8,for diacritic insensitive comparisons

Code:
set names 'UTF8'
 
@ljzagorac - The reason I'm using _ and not %, is I only want it to match 1 character (where as % will match more than 1)

@jpadie - Thanks. It actually turned out to be an encoding issue when creating his SQL data.

Cheers

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top