You are correct. To delete a row (or rows) from a MySQL database table, use:
mysql_query( "DELETE FROM MyTable WHERE field=value" );
All fields matching the WHERE (or ALL fields if the WHERE clause is missing) will be deleted.
To delete a file from the filesystem, look into the unlink() function.
-Rich