Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 30th, 2004, 09:30 AM
Registered User
 
Join Date: Oct 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete a record row, not just the record. Coby Access VBA 1 April 30th, 2007 06:29 AM
Trying to delete a record... Can't do it... lguzman Access VBA 11 August 13th, 2004 12:41 PM
automatic record delete. joeore Beginning PHP 5 April 29th, 2004 11:27 AM
Can't delete record Trojan_uk SQL Server 2000 3 November 27th, 2003 01:03 PM
Delete record but how? scifo Beginning PHP 3 August 1st, 2003 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.