Hi,
I get the following based on  my requirement:
This time it returned an empty set.See the
last.Sometimes it is ignoring the backslash
altogeather.
I want to search a string like "ah\bl" in "blah\blah".

Regards,
Ravi

mysql> use dbhub;
Database changed
mysql> CREATE TABLE slash_test ( foo VARCHAR(30) );
Query OK, 0 rows affected (0.02 sec)

mysql> INSERT INTO slash_test VALUES ('blah\\blah');
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM slash_test where foo like
"blah\\%";
Empty set (0.00 sec)

mysql> SELECT * FROM slash_test where foo like
"blah\\\%";
+-----------+
| foo       |
+-----------+
| blah\blah |
+-----------+
1 row in set (0.00 sec)

mysql> SELECT * FROM slash_test where foo like
"%ah\\bl%";
Empty set (0.00 sec)

mysql> SELECT * FROM slash_test where foo like
"%ah\\\bl%";
Empty set (0.00 sec)

mysql>

--- Jeremy Zawodny <[EMAIL PROTECTED]> wrote: > On
Mon, Jun 18, 2001 at 04:32:54PM +0100, VVM
> Ravikumar Sarma Chengalvala wrote:
> >
> > Even after escaping mysql just seems to be
> ignoring it.
> 
> Odd. I'm seeing something other than what I first
> expected. Watch
> this...
> 
> ---snip---
> 
> mysql> CREATE TABLE slash_test ( foo VARCHAR(30) );
> Query OK, 0 rows affected (0.02 sec)
> 
> mysql> INSERT INTO slash_test VALUES ('blah\\blah');
> Query OK, 1 row affected (0.01 sec)
> 
> mysql> SELECT * FROM slash_test;
> +-----------+
> | foo       |
> +-----------+
> | blah\blah |
> +-----------+
> 1 row in set (0.01 sec)
> 
> mysql> SELECT * FROM slash_test where foo like
> "blah\\%";
> Empty set (0.00 sec)
> 
> mysql> SELECT * FROM slash_test where foo like
> "blah\\\%";
> +-----------+
> | foo       |
> +-----------+
> | blah\blah |
> +-----------+
> 1 row in set (0.01 sec)
> 
> ---snip---
> 
> Hm. I needed one more '\' than I would have thought
> necessary.
> 
> Is that what you see as well?
> 
> Jeremy
> -- 
> Jeremy D. Zawodny, <[EMAIL PROTECTED]>
> Technical Yahoo - Yahoo Finance
> Desk: (408) 349-7878    Fax: (408) 349-5454    Cell:
> (408) 439-9951
> 
> MySQL 3.23.29: up 2 days, processed 15,793,960
> queries (79/sec. avg)
> 
>
---------------------------------------------------------------------
> 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
> 


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

---------------------------------------------------------------------
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

Reply via email to