----- Original Message -----
From: Ed Loehr <[EMAIL PROTECTED]>
To: Peter Landis <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
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 via email to