So what I'm trying to do is 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. Heres some code:\[code\] while ($row = mysqli_fetch_array($r,MYSQLI_ASSOC)) { echo '<tr><td align="left">' . $row['title'] . '</td><td align="left">' . $row['genre'] . '</td><td align="left">' . $row['length'] . '</td><td align="left">' . $row['created'] . '</td><td align="left">' . $row['views'] . '</td><td align="left">' . "<a href='http://stackoverflow.com/questions/10544085/wprofile.php?id={$row['upload_id']}'>Delete</a></td> . '</td></tr>'; }\[/code\]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.\[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: <pre>{$dbc->error}</pre>"; } mysqli_close(dbconnection);\[/code\]the error I am getting is "Error, query failed"This is one of the last features I need to get working to go live, driving me insane.