In the last episode (Jun 07), [EMAIL PROTECTED] said:
> It looks like mySQL is funny about a + next to a - in a string.
>
>
> If I do select count(*) from Table where Column like '%+---%'
> I get 0 records.
> If I do select count(*) from Table where Column like '%---%'
> I get 70652 records.
>
> How can I make it insensitive to a +-
Maybe you have 70652 records with "---" in them, and none with "+---" ?
It works fine in 3.23.38:
Your MySQL connection id is 2451 to server version: 3.23.38-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> create table test ( field char(50) ) ;
Query OK, 0 rows affected (0.86 sec)
mysql> insert into test values ("aaa----bbb"),("aaa+---bbb");
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select * from test;
+------------+
| field |
+------------+
| aaa----bbb |
| aaa+---bbb |
+------------+
2 rows in set (0.01 sec)
mysql> select count(*) from test where field like '%+---%';
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (0.01 sec)
mysql> select count(*) from test where field like '%---%';
+----------+
| count(*) |
+----------+
| 2 |
+----------+
1 row in set (0.01 sec)
mysql>
--
Dan Nelson
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php