Re: mySQL 'Like'-Query (BLOB) always case sensitive

From: Date: Sat, 06 Jan 2001 15:14:10 +0000
Subject: Re: mySQL 'Like'-Query (BLOB) always case sensitive
Groups: php.db 
Request: Send a blank email to php-db+get-5643@lists.php.net to get a copy of this message
Addressed to: <JMaier@maiersoft.de> php-db@lists.php.net ** Reply to note from <JMaier@maiersoft.de> Fri, 5 Jan 2001 15:38:40 +0100 > > Hi all, > > i'd like to know, whether it's possible to perform a case-INsensitive > "like"-query against a mySQL-BLOB field. > > E.g.: > > This one IS case-sensitive (myBlob being of BLOB-type): "select > myBlob from MyTable where myBlob like '%bad%'" > > but this one's NOT case-sensitive (myVarChar being of VARCHAR-type): > "select myVarChar from MyTable where myVarChar like '%good%'" > > I do want to build a fulltext-search-engine and cannot use the > MATCH-features of the latest mySQL engine. My understanding, if you want case insensitive searches you should use one of the text datatypes in mysql. Blob fields are always case sensitive. ALTER TABLE TableName CHANGE FieldName FieldName TEXT; Or something like that, depending on the maximum size of your data. See: http://www.mysql.com/documentation/mysql/commented/manual.php?section=BLOB Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

« previous php.db (#5643) next »