Delete record without creating overheads
Hi,
I have a PHP4 script that adds, edits, views and deletes records located in a MySQL database. The problem I have is that whenever I write a delete script and execute it in the browser, I always find that when a record has been deleted that it creates overheads in the MySQL database (I use PhpMyAdmin, which points this out). My code is as follows:
if ( $_POST['delete_record_yes'] )
{
$query_record = "DELETE FROM attribute WHERE player_id = $player_id AND record_id = $record_id";
$result_record = @mysql_query ( $query_record );
if ( $result_record )
{
success message
}
fail message
}
}
Does anyone have any suggestions (1) what could be causing these overheads or (2) any better ways of deleting records with PHP4 from a MySQL database.
If it's any help, MySQL is version 4.0.20-standard ad PHP is 4.3.3.
Thanks in advance.
|