Re: search/select case-insensitivly.

From: Roj Niyogi <niyogi(at)pghoster(dot)com>
To: Zhidian Du <duzhidian(at)hotmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: search/select case-insensitivly.
Date: 2002-10-22 04:28:27
Message-ID: 3DB4D3EB.8070201@pghoster.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On the PostgreSQL function side of things, you could do:

SELECT name FROM mytable WHERE Name ILIKE('$Name');

Hope this helps! :)

Cheers,
Roj Niyogi
niyogi(at)pghoster(dot)com

pgHoster - PostgreSQL Web Hosting
http://www.pghoster.com

Zhidian Du wrote:

> I want a PHP program to search case-insensitivly.
>
> for example:
> select Name from mytable where Name = '$Name';
>
>
> Here $Name is what users' input maybe JOHN, john. How to let it match
> John in table and find that record?
>
>
> Thanks.
>
> Zhidian Du
>
>
>
>
>
> _________________________________________________________________
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Andrew McMillan 2002-10-22 08:12:58 Re: search/select case-insensitivly.
Previous Message Zhidian Du 2002-10-22 04:01:19 search/select case-insensitivly.