<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    This syntax is a hold over from the old C programming language and I
    have seen several of the newer Drupal books recommending it, not
    sure if there is a preference in D7.&nbsp; but essentially what nan wich
    (intrigued by the name) says is correct, if you build your query
    string it (as should all strings) begin with a single or double
    quote and end with the same.&nbsp; I personally can't see any problem
    coding multiple %s and %d placeholders in one string then coding
    them as a list of variables, but don't forget that your string and
    list need to be passed to a function (fscanf comes to mind), but I
    believe the new drupal get db functions&nbsp; (sorry I don't remember
    their names) do this.<br>
    <br>
    Warren Vail<br>
    <br>
    On 4/10/2011 5:55 PM, Austin Einter wrote:
    <blockquote
      cite="mid:BANLkTimnWPrLvki=yXq_MswuVr29OU7TFw@mail.gmail.com"
      type="cite">
      <div>1. </div>
      <div>When we do a SQL query, if we want to&nbsp;pass&nbsp;value to query,&nbsp;we
        make use %d for integers or %s for strings.</div>
      <div>Similarly do we have any place holders for arrays.&nbsp; </div>
      <div>&nbsp;</div>
      <div>&nbsp;</div>
      <div>2.</div>
      <div>I am facing a below typical problem, can somebody tell me
        what should I do?</div>
      <div>&nbsp;</div>
      <div>Below query works fine.</div>
      <div>SELECT skillid FROM {resubmt_skills}&nbsp;&nbsp;WHERE
        resubmt_skills.skillname IN (<strong>'PHP', 'HTML', 'SQL'</strong>)&nbsp;&nbsp;
      </div>
      <div>&nbsp;</div>
      <div>But in above query search string&nbsp;&nbsp;<strong>'PHP', 'HTML',
          'SQL' </strong>is hard coded.</div>
      <div>I want to make the query generic.</div>
      <div>&nbsp;</div>
      <div>Lets say in custom search form, user entered search string
        PHP, Telecom, HTML,, so how can I write a generic query.</div>
      <div>&nbsp;</div>
      <div>Thanks</div>
      <div>Austin&nbsp;</div>
    </blockquote>
    <br>
  </body>
</html>