Re: [PHP3] Help needed with regualr, or regexs expressions. - Mailing list pgsql-general

From Teodor Cimpoesu
Subject Re: [PHP3] Help needed with regualr, or regexs expressions.
Date
Msg-id 375817B7.A9BDEB9B@digiro.net
Whole thread Raw
In response to Help needed with regualr, or regexs expressions.  ("Robert Chalmers" <robert@chalmers.com.au>)
List pgsql-general
Robert Chalmers wrote:
>
> Hi,
> I trying to return specific codes from the database, and the part of the
> code that works when actually in the database is like this;
>
>     => select code from catalog where code ~ '^1[a-zA-Z]';
>
> This works, returning ONLY those codes from the table that contain the
> number 1 in the first position, and non others.
>
> However....  when placed in the php3 script, like this, it errors out?  What
> am I doing wrong???/
>
> (.... and code ~ '^$category[a-zA-Z]' order by code");
>

try "'^".$category."[a-zA-Z]' ..."

--
CIMPOESU Teodor, Web Programmer

@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo@digiro.net,+(401)-330.47.28

official home page ~ http://www.digiro.net/
Internet  web page ~ http://internet.digiro.net/

pgsql-general by date:

Previous
From: Stuart Rison
Date:
Subject: Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!!
Next
From: fabian baena
Date:
Subject: Using Postgres with CGI's