title: Drupal 6 db_query files table
body: <p>As part of moving from a windows server to a linux server I have to clean up a large number of filenames.</p>
  
  <p>My Problem is that when I execute:</p>
  
  <p><code>db_query("UPDATE {files} SET filename = '%s' AND filepath = '%s' WHERE fid = %d", $file-&gt;filename, $file-&gt;filepath, $file-&gt;fid);</code></p>
  
  <p>and afterwards select the content for $file->fid the filename field has the value of "0"</p>
  
  <p>If I dump the query as text both before and after it's being executed the filename field contains the filename I have specified where as the filepath is being stored correctly.</p>