Re: [PHP3] Help needed with regualr, or regexs expressions.

From: Teodor Cimpoesu <teo(at)digiro(dot)net>
To: Robert Chalmers <robert(at)chalmers(dot)com(dot)au>
Cc: pgsql-general(at)postgreSQL(dot)org, php3 <php3(at)lists(dot)php(dot)net>
Subject: Re: [PHP3] Help needed with regualr, or regexs expressions.
Date: 1999-06-04 18:15:19
Message-ID: 375817B7.A9BDEB9B@digiro.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)digiro(dot)net,+(401)-330.47.28

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message fabian baena 1999-06-04 23:24:12 Using Postgres with CGI's
Previous Message Stuart Rison 1999-06-04 17:20:05 Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!!