开发者

Same query works different on two different machines

开发者 https://www.devze.com 2023-02-26 02:43 出处:网络
This MySQL query SELECT id FROM product WHERE title LIKE \'%spoon%\' works fine on in MySQL on machine #1 and returns all products with spoon anywhere in the title string

This MySQL query

SELECT id FROM product WHERE title LIKE '%spoon%'

works fine on in MySQL on machine #1 and returns all products with spoon anywhere in the title string

('black spoon', 'teaspoon', 'red spoons')

Some time ago I migrated the whole thing to a machine #2 but the exact same query returns different number of results and from some reason it only returns products with word teaspoons in the title (no eg. black spoon among the results)

Both MySql servers are version 5.0.51a. That particular product table is exactly the same on both machines with all fiel开发者_Python百科ds the exact same type, length etc.

Any ideas?


do you check if your encoding charset are the same in both databases?


I am sure the problem is not in the database engine(you might want to check that (Inno,etc)) or anything like that. Check your connection config files. You might be connecting to a different database.

0

精彩评论

暂无评论...
验证码 换一张
取 消