From: | "Brett W(dot) McCoy" <bmccoy(at)lan2wan(dot)com> |
---|---|
To: | amarof <amarof(at)marwan(dot)ac(dot)ma> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] ' syntax |
Date: | 1999-06-01 19:04:33 |
Message-ID: | Pine.BSI.3.91.990601150105.25048G-100000@access1.lan2wan.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, 5 Jun 1999, amarof wrote:
> i got your answers about the syntax, it works with the strings, but when
> etat takes a variable value, it gives a parser error. example : select *
> from table where field like $txt
> the error occurs when txt takes the value (doctortat d'etat).
Is this in Perl or PHP3? You should be doing it like:
"select * from table where field like '$txt';"
It's especially important that your query string be delimited by double
quotes in Perl, or it won't interpolate your variable. If unsure, use
the generic quote facility:
qw(select * from table where field like '$txt';)
where the parentheses are functioning as quote characters.
Brett W. McCoy
http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
It's not enough to be Hungarian; you must have talent too.
-- Alexander Korda
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-06-01 19:17:49 | Re: [ADMIN] Re: [SQL] Data recovery |
Previous Message | Jan Wieck | 1999-06-01 19:01:39 | Re: [ADMIN] Re: [SQL] Data recovery |