pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roj Niyogi <niyogi@pghoster.com>
To: Zhidian Du <duzhidian@hotmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: search/select case-insensitivly.
Date: Mon, 21 Oct 2002 23:28:27 -0500
Message-ID: <3DB4D3EB.8070201@pghoster.com> (raw)
In-Reply-To: <F102Xb29dhyCHrmTiKT00001e1c@hotmail.com>
References: <F102Xb29dhyCHrmTiKT00001e1c@hotmail.com>

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@pghoster.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@postgresql.org





view thread (7+ messages)  latest in thread

Message-ID: <3DB4D3EB.8070201@pghoster.com>
Permalink:  ../3DB4D3EB.8070201@pghoster.com/
Also on:    postgresql.org/message-id/3DB4D3EB.8070201@pghoster.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: niyogi@pghoster.com, duzhidian@hotmail.com
  Subject: Re: search/select case-insensitivly.
  In-Reply-To: <3DB4D3EB.8070201@pghoster.com>
  References: <F102Xb29dhyCHrmTiKT00001e1c@hotmail.com> <3DB4D3EB.8070201@pghoster.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox