Re: POSTGRESQL and PERL? - Mailing list pgsql-sql

From Richard Huxton
Subject Re: POSTGRESQL and PERL?
Date
Msg-id 008601bfc739$ac22fa60$1001a8c0@archonet.com
Whole thread Raw
In response to POSTGRESQL and PERL?  (Peter Landis <ntwebdeveloper@yahoo.com>)
List pgsql-sql
----- 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



pgsql-sql by date:

Previous
From: Ed Loehr
Date:
Subject: Re: POSTGRESQL and PERL?
Next
From: Joseph Shraibman
Date:
Subject: Re: aliases break my query