Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA51817 for ; Fri, 26 May 2000 12:30:55 -0400 (EDT) (envelope-from eloehr@austin.rr.com) Received: from austin.rr.com ([24.93.36.232]) by mail.austin.rr.com with Microsoft SMTPSVC(5.5.1877.357.35); Fri, 26 May 2000 11:32:00 -0500 Message-ID: <392EA7D7.BD13724E@austin.rr.com> Date: Fri, 26 May 2000 11:35:35 -0500 From: Ed Loehr X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Peter Landis CC: "pgsql-sql@postgresql.org" Subject: Re: POSTGRESQL and PERL? References: <20000526155818.9972.qmail@web3204.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/165 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... Regards, Ed Loehr