From: Richard Huxton <dev@archonet.com>
To: pgsql-sql@postgresql.org
Subject: Re: POSTGRESQL and PERL?
Date: Fri, 26 May 2000 18:41:33 +0100
Message-ID: <008601bfc739$ac22fa60$1001a8c0@archonet.com> (raw)
References: <20000526155818.9972.qmail@web3204.mail.yahoo.com>
<392EA7D7.BD13724E@austin.rr.com>
----- Original Message -----
From: Ed Loehr <eloehr@austin.rr.com>
To: Peter Landis <ntwebdeveloper@yahoo.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Friday, May 26, 2000 5:35 PM
Subject: Re: [SQL] POSTGRESQL and PERL?
> Peter Landis wrote:
> >
> > but what if you have a variable set like:
> > $sort_selection = "name";
> >
> > How do you sort by the variable?
> >
> > For instance you cannot do...
> > $sqh = $dbh->prepare(q{select name from company order
> > by $sort_selection;});
>
> Why not? The query string is created before prepare is called...
>
I think you need qq{select ...} to indicate double-quoting "" or the
variable won't be substituted.
- Richard Huxton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com
Subject: Re: POSTGRESQL and PERL?
In-Reply-To: <008601bfc739$ac22fa60$1001a8c0@archonet.com>
References: <20000526155818.9972.qmail@web3204.mail.yahoo.com> <392EA7D7.BD13724E@austin.rr.com> <008601bfc739$ac22fa60$1001a8c0@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox