Nice bit of code that shows how many rows were deleted, if any!
Note: If the data to be written is the same it will show “0 records added”
1 2 3 4 5 6 7 8 9 10 |
echo $sql = "UPDATE todolist SET list = '$movetolist' WHERE item = '$itemtext' "; if ($mysqli->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $sql->error; } echo "Affected rows: " . $mysqli -> affected_rows; |