Re: Deleting a Record.
From: Rob (talon2lm_at_yahoo.com)
Date: 11/24/03
- Next message: Michael Fuhr: "Re: Location Header from class"
- Previous message: Allodoxaphobia: "Re: Hide email from spammers"
- In reply to: Jochen Daum: "Re: Deleting a Record."
- Next in thread: J0hn Sm1th: "Re: Deleting a Record."
- Reply: J0hn Sm1th: "Re: Deleting a Record."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 Nov 2003 21:09:31 -0700
Hi Jochen,
Here's the exact code I ran
</HEAD>
<BODY BGCOLOR=RED>
<?php
$link = mysql_connect("localhost");
if(! $link)
die("Could not connect to MySQL");
$database = "PC_Store";
mysql_select_db($database)
or die ("could not open $database: ".mysql_error() );
- error_reporting(E_ALL);
$sql = "DELETE FROM inventorydata VALUES('$ProductID')";
print $sql;
$result = mysql_query("DELETE FROM inventorydata
VALUES('$ProductID')");
var_dump($result);
var_dump(mysql_error());
var_dump(mysql_rows_affected());
?>
<BR>
Entry Deleted
</FORM>
<FORM METHOD=POST ACTION = "PC_Store1.php">
<INPUT TYPE = "submit" VALUE ="Return To Main Menu">
</FORM>
And here is the Exact output...
DELETE FROM inventorydata VALUES('40')bool(false) string(66) "You have an
error in your SQL syntax near 'VALUES('40')' at line 1"
Fatal error: Call to undefined function: mysql_rows_affected() in
c:\apache\htdocs\pcsdelpexein.php on line 23
I'm not sure what the syntax error is.... 40 is the product Id for the row I
want to delete.
The Fatal error is way beyond me....I appreciate your help!
Rob
- Next message: Michael Fuhr: "Re: Location Header from class"
- Previous message: Allodoxaphobia: "Re: Hide email from spammers"
- In reply to: Jochen Daum: "Re: Deleting a Record."
- Next in thread: J0hn Sm1th: "Re: Deleting a Record."
- Reply: J0hn Sm1th: "Re: Deleting a Record."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|