phpbar.de logo

Mailinglisten-Archive

Unterschied von LIKE und RLIKE

Unterschied von LIKE und RLIKE

Technik via echtwahr.com - Neuer Server technik at echtwahr.com
Die Jan 31 14:08:19 CET 2006


Hi,


 > SELECT * FROM tbl WHERE fl_30 RLIKE 'wort'
 > weniger bzw. eine andere Trefferanzahl hat als
 > SELECT * FROM tbl WHERE fl_30 LIKE '%wort%'
 > die Doku bringt mich da nicht weiter.

Aus der MySQL 4.1 Doku

expr REGEXP pat
expr RLIKE pat
Performs a pattern match of a string expression expr against a pattern pat.
The pattern can be an extended regular expression. The syntax for regular
expressions is discussed in section G MySQL Regular Expressions. Returns 1
if expr matches pat, otherwise returns 0. If either expr or pat is NULL, the
result is NULL. RLIKE is a synonym for REGEXP, provided for mSQL
compatibility. Note: Because MySQL uses the C escape syntax in strings (for
example, `\n' to represent newline), you must double any `\' that you use in
your REGEXP strings. As of MySQL 3.23.4, REGEXP is not case sensitive for
normal (not binary) strings.
...
REGEXP and RLIKE use the current character set (ISO-8859-1 Latin1 by
default) when deciding the type of a character. However, these operators are
not multi-byte safe.

Das kann es eventuell sein:
REGEXP is not case sensitive for normal (not binary) strings.





Mit freundlichen Grüssen
    Thomas Goik

--
Ihre Auktionsseiten im Internet
http://www.auxion.de
http://www.Xhammer.de
 


-- 
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->>  http://www.4t2.com/mysql 


php::bar PHP Wiki   -   Listenarchive