<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hey SPUG Team,<BR>
&nbsp;<BR>
Thank you for the quick responses and all the different ways a programmer can solve this type of problem.&nbsp; The manual substitution method has done the trick!<BR>
&nbsp;<BR>
&nbsp;<BR>
Thank you again,<BR>
&nbsp;<BR>
Stephen<BR><BR><BR><BR><BR>

<HR id=stopSpelling>
<BR>
&gt; Date: Tue, 8 Apr 2008 07:32:18 -0700<BR>&gt; Subject: Re: SPUG: Turning off auto-quoting during DBI Binding.<BR>&gt; From: sthoenna@efn.org<BR>&gt; To: zstephenblum@hotmail.com<BR>&gt; CC: spug-list@pm.org<BR>&gt; <BR>&gt; On Mon, Apr 07, 2008 at 08:30:35PM -0700, Stephen Blum wrote:<BR>&gt; &gt; How does one turn off the annoying and sometimes unneeded auto-quoting<BR>&gt; that occurs during DBI Bindings? I have searched the net for a while<BR>&gt; now and have found little on the subject.<BR>&gt; &gt;<BR>&gt; &gt; example:<BR>&gt; &gt;<BR>&gt; &gt; $sql = q(thrrr_id in (?));<BR>&gt; &gt; $sth = $dbh-&gt;prepare($sql);<BR>&gt; &gt; $sth-&gt;execute( q(1,2,3,4,5) );<BR>&gt; &gt;<BR>&gt; &gt; DBI executes this: thrrr_id in ('1,2,3,4,5')<BR>&gt; &gt; But I want to execute this: thrrr_id in (1,2,3,4,5)<BR>&gt; &gt;<BR>&gt; &gt; DBI adds quotes and I don't want them. If there is no way around this I<BR>&gt; can forgo the performance/convenience of bindings.<BR>&gt; <BR>&gt; There's no way around it. Either just interpolate into the query:<BR>&gt; <BR>&gt; $ids = "1,2,3,4,5";<BR>&gt; $sql = qq(thrrr_id in ($ids));<BR>&gt; $sth = $dbh-&gt;prepare($sql);<BR>&gt; $sth-&gt;execute();<BR>&gt; <BR>&gt; or use an array and provide the appropriate number of ? instead:<BR>&gt; <BR>&gt; @ids = (1,2,3,4,5);<BR>&gt; $sql = 'thrrr_id in ('.join(',',('?') x @ids).')';<BR>&gt; $sth = $dbh-&gt;prepare($sql);<BR>&gt; $sth-&gt;execute(@ids);<BR>&gt; <BR>&gt; <BR>&gt; <BR><BR></body>
</html>