Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 474E6B5DBE0 for ; Mon, 4 Jul 2011 10:42:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 58839-08 for ; Mon, 4 Jul 2011 13:41:59 +0000 (UTC) X-Greylist: delayed 00:12:08.527399 by SQLgrey-1.7.6 Received: from brama.com (brama.com [208.67.225.160]) by mail.postgresql.org (Postfix) with ESMTP id BC39EB5DBD8 for ; Mon, 4 Jul 2011 10:41:58 -0300 (ADT) Received: from brama.com (brama.com [127.0.0.1]) by brama.com (8.13.8/8.13.8) with ESMTP id p64DTnLa007964 for ; Mon, 4 Jul 2011 09:29:49 -0400 Received: (from apache@localhost) by brama.com (8.13.8/8.13.8/Submit) id p64DTnF6007961; Mon, 4 Jul 2011 09:29:49 -0400 X-Authentication-Warning: brama.com: apache set sender to pyz@brama.com using -f Received: from 71.167.232.56 (SquirrelMail authenticated user pyz) by webmail.brama.com with HTTP; Mon, 4 Jul 2011 09:29:49 -0400 (EDT) Message-ID: <55377.71.167.232.56.1309786189.squirrel@webmail.brama.com> Date: Mon, 4 Jul 2011 09:29:49 -0400 (EDT) Subject: DBD::Pg - question on using LIKE operator with bind variable From: "Max Pyziur" To: pgsql-interfaces@postgresql.org User-Agent: SquirrelMail/1.4.8-5.el5.centos.10 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/1 X-Sequence-Number: 6959 Greetings, I would like to use a bind variable with a LIKE operator. An example of the query that I'm trying to use is the following: SELECT ? , aa.f1, aa.f2, aa.f3, aa.f4 FROM orgs aa WHERE aa.f1 LIKE '%?%' How do I get the conditional part of the query (WHERE aa.f1 LIKE '%?%') to accept a bind variable? Much thanks for your help. Max Pyziur pyz@brama.com