Reputation: 1466
Why is this creating a new row at the bottom with this data instead of modifying that specified row?
$sql = "
UPDATE products SET
productName = '$pname',
productDescription = '$pdes'
WHERE pID = '$pidmod'
";
WHERE pID='$pidmod'
is the auto increment field.
Upvotes: 0
Views: 34
Reputation: 115520
An UPDATE
statement does not add rows - unless there are triggers involved.
Upvotes: 3