title: While Loop in SQL query
body: <p>I'm not sure why this SQL query is not working. </p>
  
  <p>I'm new to SQL/PHP so please forgive.</p>
  
  <pre><code>mysql_query("
      SELECT * FROM table WHERE name = " . "'Bob'" . 
      while($i &lt; $size)
      {
          $i++; 
          echo "OR name = '"; 
          echo $array[$i] . "'";
      } . 
      " ORDER BY id DESC "
  );
  </code></pre>
  
  <p>Dreamweaver gives me an error saying it is not correct but does not tell me what is wrong.</p>
  
  <p>Is it possible to put a while loop into an sql command?</p>