title: mysqli DELETE not working
body: <p>I'm trying to have a <code>DELETE</code> link printed alongside each <code>$row</code>. Also, on another page, have a "DOWNLOAD" link - they should work the same way.  The problem is this:  I am getting both DELETE and DOWNLOAD to print out alongside each record, but using the code I have, nothing happens or my script bails out on an error.  For some reason I have the most complex features of my site up and running but this still eludes me. Here's some code:</p>
  
  <pre><code>    while ($row = mysqli_fetch_array($r,MYSQLI_ASSOC))
      {
    echo '&lt;tr&gt;&lt;td align="left"&gt;' .
      $row['title'] . '&lt;/td&gt;&lt;td align="left"&gt;'
      . $row['genre'] . '&lt;/td&gt;&lt;td align="left"&gt;'
      . $row['length'] . '&lt;/td&gt;&lt;td align="left"&gt;'
      . $row['created'] . '&lt;/td&gt;&lt;td align="left"&gt;'
      . $row['views'] . '&lt;/td&gt;&lt;td align="left"&gt;'
      . "&lt;a href='wprofile.php?id={$row['upload_id']}'&gt;Delete&lt;/a&gt;&lt;/td&gt; . '&lt;/td&gt;&lt;/tr&gt;';
      }
  </code></pre>
  
  <p>and on the same php page I have this logic which is failing me. the example is for delete but the same fail follows for my DOWNLOAD link problem.</p>
  
  <pre><code>    if(isset($_GET['upload_id']))
      {
      $id = intval($_GET['upload_id']);
  
      require_once (dbconnectionpath);
  
      $delquery = "DELETE FROM 'upload' WHERE 'upload_id' = {$id}";
      $done = @mysqli_query ($dbc, $delquery); //run the query
  
      if($done) {
      if (mysqli_num_rows($done)==1) {
      echo 'Record deleted';
      }
      else{
      echo 'Delete failed';
      }
  
      @mysqli_free_result($result);
      }
      else{
      echo "Error! Query failed: &lt;pre&gt;{$dbc-&gt;error}&lt;/pre&gt;";
      }
      mysqli_close(dbconnection);
  </code></pre>
  
  <p>the error I am getting is "Error, query failed"</p>