Did you try the first query again?  Is it possible that another
"Szczech" was added in the time you did both queries?  What happens
when you the simple

mysql> select id_c, name, from clients where name like 'Szczec%';
and
mysql> select id_c, name, from clients where name like 'Szczech';
and most importantly
mysql> select id_c, name, from clients where name = 'Szczech';

The answers to those will help figure out what's going wrong.

-Sheeri

On 5/31/06, Lukasz Budnik <[EMAIL PROTECTED]> wrote:
Hi All,

I'm using 5.0.21 on Gentoo.

I've got very strange problem.

I have clients table with id_c and name columns.

I'm running simple selects:

mysql> select id_c, name, concat('#',name, '@'), length(name) from clients
where name like 'Szczec%';
+-------+----------+---------------------------+------------------+
| id_c  | name     | concat('#',name, '@')     | length(name)     |
+-------+----------+---------------------------+------------------+
| 30181 | Szczech  | #Szczech@                 |                7 |
+-------+----------+---------------------------+------------------+
1 row in set (0.00 sec)

mysql> select id_c, name, concat('#',name, '@'), length(name) from clients
where name like 'Szczech';
+-------+----------+---------------------------+------------------+
| id_c  | name     | concat('#',name, '@')     | length(name)     |
+-------+----------+---------------------------+------------------+
| 30181 | Szczech  | #Szczech@                 |                7 |
| 30693 | Szczech  | #Szczech@                 |                7 |
+-------+----------+---------------------------+------------------+
2 rows in set (0.00 sec)

ups... what's going on?

% stands for (m)any character(s) but returned 1 row,
when % replaced with 'h' the same query returned 2 rows.

I'm using latin2 charsets but 'h' is standard latin1 character.

Any ideas?

thanks in advance for any help
best regards
Lukasz Budnik


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to