Subject | Re: [firebird-support] Re: about searching in a blob |
---|---|
Author | Yves Glodt |
Post date | 2003-07-28T20:34:16Z |
On Monday 28 July 2003 22:13, Aage Johansen wrote:
thank you,
Yves
Linux 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686
22:32:39 up 1:46, 1 user, load average: 0.33, 0.23, 0.27
> On Mon, 28 Jul 2003 19:05:45 +0000 (UTC), Yves Glodt <yg@...>wrote:
> > I have this table in my php knowledgebase system:I'll try it out tomorrow, lets see what happens, I have many "öäüéàèëê"
> > CREATE TABLE "ADDRESS" (
> > "CATEGORY" INTEGER NOT NULL,
> > "NAME" VARCHAR(100) CHARACTER SET ISO8859_1 NOT NULL,
> > "KEYINDEX" INTEGER NOT NULL,
> > "ADDRESS" BLOB SUB_TYPE TEXT SEGMENT SIZE 100 CHARACTER SET
> > ISO8859_1,
> > "DATE_MODIFIED" VARCHAR(25) CHARACTER SET ISO8859_1,
> > "HOST_MODIFIED" VARCHAR(25) CHARACTER SET ISO8859_1,
> > "USER_MODIFIED" VARCHAR(100) CHARACTER SET ISO8859_1
> > );
> >
> > and I have a search functionality which uses this query:
> >
> > $sth = ibase_query("SELECT KEYINDEX,NAME,CATEGORY,DATE_MODIFIED
> > FROM ADDRESS WHERE UPPER(NAME) LIKE
> > '%".strtoupper($_POST['crit'])."%' OR ADDRESS LIKE
> > '%".$_POST['crit']."%' ORDER BY 2 DESC");
> >
> > I know the UPPER/strtoupper stuff for the varchar column is ugly
> > but it works. Well for the blob it doesn't, I cannot get (or
> > fake...) case- insensitivity with UPPER (I get string conversion
> > errors)... How could this be done? I use FirebirdSS-1.0.2.908-0 on
> > RH9
>
> You could try
> ...
> ADDRESS containing 'your string here'
> order by 2 desc
>
> "containing" is case insensitive, but possibly not quite perfect with
> not-lower-ANSI characters.
thank you,
Yves
> ----
> Aage J.
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Buy Ink Cartridges or Refill Kits for Your
> HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders
> $50 or more to the US & Canada.
> http://www.c1tracking.com/l.asp?cid=5511
> http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/67folB/TM
> ---------------------------------------------------------------------
>~->
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
Linux 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686
22:32:39 up 1:46, 1 user, load average: 0.33, 0.23, 0.27