Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-31-2005, 10:36 AM   #1
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default SQL Xeef = xEeF ???

SELECT * FROM UserList WHERE Name='xeEf'

i get

id : 1
Name : Xeef ???? why ? Xeef<>xeEf !!!
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 09-01-2005, 06:07 AM   #2
VReelPower
Registered User
 
Join Date: Jul 2005
Posts: 71
Default

By default the comparison is not case sensitive. You have to use 'binary' after the equal sign to check fo case sensitive string as below.

SELECT * FROM UserList WHERE Name = binary 'xeEf'
VReelPower is offline   Reply With Quote
Old 09-01-2005, 09:40 AM   #3
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default



cool

THX a lot

i was geting some similayr ancer on an other forum
but there i shoud change the characterset of the tabel
and end up whit changing the row type to VarBinary
what is a problem because later i will need to check
also
Name LIKE '%xeef%'

this binary stoff is great !
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 09-02-2005, 05:46 AM   #4
VReelPower
Registered User
 
Join Date: Jul 2005
Posts: 71
Default

You can also use binary for ' like' or any other condition checking to search for case sensitive string. No need to go to the length of changing the whole character set just for the search of particular string, otherwise, it may slow down the query performance.

SELECT * FROM UserList WHERE Name like binary 'xeEf'
VReelPower is offline   Reply With Quote
Old 09-02-2005, 06:49 AM   #5
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Weird, mine is "binary" by default.
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 09-02-2005, 09:51 AM   #6
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

@VReelPower

by LIKE i need no binary

it's the user DB and ofcourse i need to by sure that Xeef Xeef is and not xEEf
whit LIKE i will test that there is no ADMIN whit a symilar name
there for a need no binary (eg if Xeef Admin XEEF1 isn't alowed)
what woud by a problem if the hole tabel is binary

cheers Xeef
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 09-06-2005, 06:29 AM   #7
VReelPower
Registered User
 
Join Date: Jul 2005
Posts: 71
Default

Hi Xeef, I got your point. There are scenarios where the whole string will be converted to binary when storing in mySQL database. Still there's no harm to apply "binary" check for case-sensitive search string to a binary string. Have not tried to convert the whole string to binary but I do take that this 'binary' check applies to all mode and all kind of search strings. So there's no harm to include "binary" into your comparison checking for case-sensitive search string unless if you're pretty sure the whole string to be searched at is already in binary format.
VReelPower is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:11 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.