| From: | "Richard Huxton" <dev(at)archonet(dot)com> |
|---|---|
| To: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: POSTGRESQL and PERL? |
| Date: | 2000-05-26 17:41:33 |
| Message-ID: | 008601bfc739$ac22fa60$1001a8c0@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
----- Original Message -----
From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Peter Landis <ntwebdeveloper(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joseph Shraibman | 2000-05-26 17:47:03 | Re: aliases break my query |
| Previous Message | Ed Loehr | 2000-05-26 16:35:35 | Re: POSTGRESQL and PERL? |