Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3B78C475EBD for ; Tue, 10 Dec 2002 09:04:11 -0500 (EST) Received: from cornelius-olsen.dk (0x50c4f773.arcnxx7.adsl-dhcp.tele.dk [80.196.247.115]) by postgresql.org (Postfix) with ESMTP id C2DB6475E6F for ; Tue, 10 Dec 2002 09:04:07 -0500 (EST) To: pgsql-php@postgresql.org Subject: Re: forms /selects MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.9 November 16, 2001 Message-ID: From: jco@cornelius-olsen.dk Date: Tue, 10 Dec 2002 15:03:33 +0100 X-MIMETrack: Serialize by Router on sonic/cgroup(Release 5.0.11 |July 24, 2002) at 12/10/2002 03:03:36 PM, Serialize complete at 12/10/2002 03:03:36 PM Content-Type: multipart/alternative; boundary="=_alternative 004D482BC1256C8B_=" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/24 X-Sequence-Number: 1699 This is a multipart message in MIME format. --=_alternative 004D482BC1256C8B_= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I see a couple of errors, one of which is the source of your problem. You write: "SELECT name FROM thetable WHERE (nome=3D$leter%) ORDER BY nome ASC= "; This would evaluate to "SELECT name FROM thetable WHERE (nome=3DA%) ORDER BY nome ASC"; What you need to write is: "SELECT name FROM thetable WHERE (nome like '$leter%') ORDER BY nom= e ASC"; "like" is required to make regular expression match. The quotes are always required when dealing with strings (and a few other= =20 types). You could have just debugged this by echo $query; Also: Letter contains two t's. :) Regards /J=F8rn Cornelius Olsen --=_alternative 004D482BC1256C8B_= Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I see a couple of errors, one of whi= ch is the source of your problem.
You write:
        <= font size=3D2 face=3D"Courier New">"SELECT name FROM thetable WHERE (n= ome=3D$leter%) ORDER BY nome ASC";
This would evaluate to
        "S= ELECT name FROM thetable WHERE (nome=3DA%) ORDER BY nome ASC";

What you need to write is:
        "S= ELECT name FROM thetable WHERE (nome like '$leter%') ORDER BY nome ASC"= ;;

"like" is required to mak= e regular expression match.
The quotes are always required when= dealing with strings (and a few other types).

You could have just debugged this b= y
        echo $q= uery;

Also: Letter contains two t's. :)

Regards
/J=F8rn Cornelius Olsen --=_alternative 004D482BC1256C8B_=--