Trying to delete a record with PHP

I’m trying to delete a record and update a table using a stored procedure but I can’t seem to even get the error message to display properly. Below is my php and stored procedure:

[php]$fileID = 11719;
$rmaID = 2932;
// if confirm deletion button has been clicked, delete record
if (isset($_POST[‘delete’])) {
$stmt = mysqli_prepare($conn, ‘CALL update_new_sn(?, ?)’);
mysqli_bind_param(‘ii’, $fileID, $rmaID);

$deleteRecord = mysqli_execute($stmt);
if (!$deleteRecord) {
	echo "Error!: ", mysqli_error($stmt);
} else {
// if there's an error affected_rows is -1


Stored Procedure

DROP PROCEDURE update_new_sn//
CREATE DEFINER=admin@localhost PROCEDURE update_new_sn(in selectedID int, in selectedRMAID int)

delete from dropbox where id = selectedID;
update rma set ref_status_id = 0 where id = selectedRMAID;



[php]$deleteRecord = $stmt->execute();[/php]

instead of

[php]$deleteRecord = mysqli_execute($stmt);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service