1

This query:

SELECT pair_ID FROM quotes_search WHERE  pair_type="type_one"
    AND ( symbol LIKE 'лукойл%' OR  UPPER(pair_name) LIKE UPPER('лукойл%') );

fails with Russian characters (English characters works fine). Any ideas? table and field are utf8_general_ci

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''
One more thing, This query is successful when using mysql version:5.1.61
But failes when mysql version: 5.1.70

Asaf Maoz
  • 675
  • 3
  • 6
  • 23

2 Answers2

1

Run this queries after connecting db

SET character_set_client = "utf8";
SET character_set_results = "utf8";
SET character_set_connection = "utf8";
mugiseyebrows
  • 4,138
  • 1
  • 14
  • 15
0

Try this

... symbol LIKE CONCAT(_utf8 x'лукойл%', '%') OR ...
Artur Udod
  • 4,465
  • 1
  • 29
  • 58