Received: from www-uk-05.digiserve.com ([195.172.23.32]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA94645 for ; Fri, 26 May 2000 13:45:20 -0400 (EDT) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id SAA19114 for ; Fri, 26 May 2000 18:44:59 +0100 (BST) Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id B5F752A0AC for ; Fri, 26 May 2000 18:41:51 +0100 (BST) Message-ID: <008601bfc739$ac22fa60$1001a8c0@archonet.com> From: "Richard Huxton" To: References: <20000526155818.9972.qmail@web3204.mail.yahoo.com> <392EA7D7.BD13724E@austin.rr.com> Subject: Re: POSTGRESQL and PERL? Date: Fri, 26 May 2000 18:41:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Archive-Number: 200005/166 ----- Original Message ----- From: Ed Loehr To: Peter Landis Cc: 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