Proper escaping for char(3) string, or PHP at fault, or me at fault?

From: "semi-ambivalent" <rloefgren(at)forethought(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Proper escaping for char(3) string, or PHP at fault, or me at fault?
Date: 2007-02-13 17:32:38
Message-ID: 1171387958.873195.14740@p10g2000cwp.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

All,

I have a char(3) column that has occasional values of this:
(V)

In a PHP-called nested query I've a line something like:
select * from tableA where = any (select date from tableA where void !
= '(V)') group by date order by record

This is throwing a query error in the log that blames the parens but
my efforts to properly escape them with backslashes or "E" doesn't
help. So perhaps this is an error in my PHP, and I'll deal with that,
but in the SQL portion shouldn't '\(V\)' do the trick? Or is it now
'E(VE)'?

thanks,

r

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-02-13 18:01:14 Re: [GENERAL] contrib/levenshtein() has a bug?
Previous Message William Leite Araújo 2007-02-13 17:19:41 Re: Having a problem with my stored procedure