title: How to use mySQL WHERE clause in PHP?
body: <p>Can't seem to pass anything from the <code>securityinfo</code> field. </p>
  
  <pre><code>for ($k = 1; $k &lt; $fieldscnt; $k++)
  {
      $selectsecurityname = mysql_query("SELECT `security name` FROM securityinfo WHERE symbol = '$symbol[$k]'") or die(mysql_error());
      $securityname = mysql_fetch_array($selectsecurityname);
      $sym = $symbol[$k]
  
      echo "&lt;td&gt;$securityname[$sym]&lt;/td&gt;";
  }
  </code></pre>
  
  <p>Basically, I want to to search for the row that has a match in the <code>symbol</code> field, then return the value from the <code>securityinfo</code> field in the same row.</p>