SunQuest
 
           MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 28th, 2005, 04:46 PM
hiran hiran is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 1 hiran User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 35 sec
Reputation Power: 0
Cannot retrive values stored with 2 backslashes using Like

Hi,

I am using mysql 4.1.9-pro and stored '\\name' in the name column of test table using insert into test(name,address) values('\\\\name','address');

When I tried to retrive this using select * from test where name like '%\\\\name' empty set is retrived

Butwhen i use '%\\name' and '%\\\\\\name' (6 backslashes) and '%\\\\\\\\name' (8 backslashes) it worked fine. Can anybody help me on this. why it is not retreiving the correct result set when I use 4 backslashes?

Also I have seen this behaviour only in several machines. I suspect this is a character_set issue.

Thanks

Hiran

Reply With Quote
  #2  
Old September 29th, 2005, 12:59 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2Folding Points: 650865 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 32 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
Hmmm, I'm running Mysql 4.1.12a, and on my machine it works fine. Looking at the MySQL changelogs, some problems with 'LIKE' were fixed in 4.1.11, so you might want to consider upgrading.

Considering 4.1.14 and 5.0 are both out, I might consider doing that too...
__________________
This is my code. Is it not nifty?

"The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools."
---Douglas Adams


Join the Itsacon fanclub!    
Zero Tolerance: Spammers banned so far: 264

Reply With Quote
  #3  
Old September 29th, 2005, 08:02 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
It's odd taht when you put too many backslashes it still works.
I agree with Itsacon, it must be a bug...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Cannot retrive values stored with 2 backslashes using Like


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway