<div>Anth</div>
<div>Thanks for help.</div>
<div> </div>
<div>I tried this option, still get &#39;\&#39; warning.</div>
<div> </div>
<div>$skill = &quot;PHP, TML, HTML&quot;;<br> $pieces = explode(&quot;,&quot;, $skill);<br> $in_string = &quot;&#39;&quot; . implode(&quot;&#39;,&#39;&quot;, $pieces) . &quot;&#39;&quot;;</div>
<div>  <br>$query = db_query(&quot;SELECT name, email, phone, yrsofexp FROM {resubmt_table} <br>  WHERE resubmt_table.uid IN (SELECT DISTINCT uid FROM {resubmt_users_skills} <br>  WHERE resubmt_users_skills.skillid IN(SELECT skillid FROM {resubmt_skills} <br>
  WHERE resubmt_skills.skillname IN (%s)))&quot;, $in_string); </div>
<div> </div>
<div> </div>
<div>I get the warning </div>
<div> </div>
<div><font color="#ff6600">user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;\&#39;PHP\&#39;,\&#39; TML\&#39;,\&#39; HTML\&#39;)))&#39; at line 4 query: SELECT name, email, phone, yrsofexp FROM resubmt_table WHERE resubmt_table.uid IN (SELECT DISTINCT uid FROM resubmt_users_skills WHERE resubmt_users_skills.skillid IN(SELECT skillid FROM resubmt_skills WHERE resubmt_skills.skillname IN (\&#39;PHP\&#39;,\&#39; TML\&#39;,\&#39; HTML\&#39;))) in C:\MyWeb6.20\wamp\www\livejobs1\sites\default\modules\resume_search\resume_search.module on line 126.</font></div>

<div><font color="#ff6600"></font> </div>
<div><br>Thanks</div>
<div>Austin<br></div>
<div class="gmail_quote">On Mon, Apr 11, 2011 at 7:00 AM, Anth <span dir="ltr">&lt;<a href="mailto:malkouna@yahoo.com.au">malkouna@yahoo.com.au</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div bgcolor="#ffffff" text="#000000"><big><font size="-1"><big><tt>Sometimes you can&#39;t control what you&#39;re getting for your IN statement...<br><br>Try something like:<br><br>$string = &quot;PHP,HTML,SQL&quot;;<br>
$pieces = explode(&quot;,&quot;, $string);<br>$in_string = &quot;&#39;&quot; . implode(&quot;&#39;,&#39;&quot;, $pieces) . &quot;&#39;&quot;;</tt></big></font></big><font size="-1"><font face="Helvetica, Arial, sans-serif"><br>
</font></font><br>On 6:59 AM, nan wich wrote: 
<blockquote type="cite">
<div style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt">
<div>In Drupal code, you should <strong>never</strong> find a query with %s that is not surrounded by quotes. To do what you are looking for check the db_placeholders function in the API docs.<br> </div>
<p><font color="#ff007f" size="4" face="bookman old style, new
            york, times, serif"><em><strong>Nancy</strong></em></font></p>
<p> </p>
<p><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></p>
<div><br></div>
<div style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><br>
<div style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><font size="2" face="Tahoma">
<hr size="1">
<b><span style="FONT-WEIGHT: bold">From:</span></b> Austin Einter &lt;<a href="mailto:austin.einter@gmail.com" target="_blank">austin.einter@gmail.com</a>&gt;<br><b><span style="FONT-WEIGHT: bold">To:</span></b> <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Sun, April 10, 2011 8:23:57 PM<br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> [support] String conversion<br></font><br>
<div>Hi </div>
<div>I have a below string.</div>
<div><strong>PHP, HTML, SQL</strong></div>
<div>Want to convert it to</div>
<div><strong>&#39;PHP&#39;, &#39;HTML&#39;, &#39;SQL&#39;</strong></div>
<div> </div>
<div>I tried to write a function to do it as below. If I print the function output it prints properly.</div>
<div>If same function output I use for SQL query as below I get warning.</div>
<div> </div>
<div>Query:    SELECT skillid FROM {resubmt_skills}   WHERE resubmt_skills.skillname IN (%s)&quot;, $fSkill</div>
<div><font color="#ff0000">Warning:   SELECT skillid FROM resubmt_skills WHERE resubmt_skills.skillname IN (\&#39;ITI\&#39;,\&#39; PHP\&#39;))) in C:\MyWeb6.20\wamp\www\livejobs1\sites\default\modules\resume_search\resume_search.module on line 140.</font></div>

<div> </div>
<div>Looks it has extra forward slashes. How can I overcome this.</div>
<div> </div>
<div>Thanks</div>
<div>Austin</div>
<div> </div>
<div> </div>
<div> </div></div></div></div></blockquote></div><br>--<br>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>