Hi all,
I can't believe I can't figure out how to do this.
I've looked online everywhere...and I can't seem to figure out what's wrong.
Alright, I have a table called 'documents' in MySQL where users can upload files to the database. The table contains the following rows: d_username, d_doc1, d_doc1_name, d_doc1_size, d_doc2, d_doc2_name, and d_doc2_size
When a user wants to delete file #2 in the database...I use this command to attempt to delete it:
$sql = "DELETE d_doc2 FROM documents WHERE d_username='$username'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE d_doc2_name FROM documents WHERE d_username='$username'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE d_doc2_size FROM documents WHERE d_username='$username'";
mysql_query($sql) or die(mysql_error());
argh, i know this is wrong, but how can I delete those rows applying to the user's username?
thanks!
-influx.