phpbar.de logo

Mailinglisten-Archive

[php] 3 Update hintereinander

[php] 3 Update hintereinander

Werner Stuerenburg ws_(at)_art-quarter.com
Wed, 18 Oct 2000 20:58:31 +0200


Hans Theo Mislisch wrote:
> 
> >> vorkommen zudem ist mySQL case-sensitive d. h. 'Punkte' ist nicht das
> >> gleiche wie 'punkte'
> >>
> > nein, MySQl ist nicht case sensitive, ich habe es gerade noch mal zur
> > Sicherheit ausprobiert.
> 
> Also wenn ich es richtig im Hinterkopf habe, kommt es darauf an wie
> die db-Felder definiert sind. Es gibt Feldtypen die sind case sensitive
> andre nicht.

Was sagt das Manual?

All data saved in ISO8859_1 format. All comparisons for normal
string columns are case insensitive. 


MySQL maps all tables to filenames and with MySQL one can use
standard system tools to backup, rename, move, delete and copy
tables. This forces MySQL to be case sensitive on table names on
operating systems that have case sensitive filenames (like most
Unix systems). If you have a problem remembering table names,
create everything in lowercase. 

CHAR(M) [binary]  A fixed length string that is always filled up
with spaces to the specified length. Range 1 - 255 characters.
All end space are removed when retrieved. Is sorted and compared
case insensitively unless the binary keyword is given.  

VARCHAR(M) [binary]  A variable length string that is stored with
its length. All end space are removed when storing it. Maximum
range 1 - 255 characters. Is sorted and compared case
insensitively unless the binary keyword is given.  

TEXT and BLOB types
These are objects that can have a variable length without upper
limit. All TEXT and BLOB objects are stored with is length (saved
in 1 to 4 bytes depending on the type of object). The maximum
TEXT and BLOB length you can use is dependent on available memory
and client buffers. The only differences between TEXT and BLOB is
that TEXT is sorted and compared case insensitively while BLOB is
compared case sensitively (by character values). TEXT and BLOB
objects CANNOT be an index. 


A BETWEEN B AND C 
A is bigger or equal as B and A is smaller or equal to C. Does
the same thing as (A >= B AND A <= C) if all arguments are of the
same type. It's the first argument (A) that decides how the
comparison should be done! If A is a string expression, compare
as case insensitive strings. If A is a binary string, compare as
binary strings. If A is an integer expression compare as
integers, else compare as reals. 

BINARY means that the column will be compared case sensitive. The
default is that all strings are compared case insensitive
according to ISO-8859-1 Latin1. BINARY is 'sticky' which means
that if a column marked BINARY is used in a expression, the whole
expression is compared BINARY. 

15.8 Case sensitivity in searches.
By default a MySQL column is case insensitive (although there are
some character sets that never are case insensitive). That means
that if you search with column like 'a%'; you will get all
columns that start with A or a. If you want to make this search
case sensitive use something like INDEX(column, "A")=0 to check a
prefix. Or STRCMP(column, "A") = 0 if the whole string should be
the same. 

18.4.2 Changes in release 3.20.17
LIKE was case sensitive in some places and case insensitive in
other. Now LIKE is always case insensitive. 


-- 

Mit freundlichem Gruss
Dr. Werner Stuerenburg

_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de    http://art-quarter.com



php::bar PHP Wiki   -   Listenarchive