Make sure weather row in a table is deleted
function child_delete($c_no, $shift, $p_date, $dname) {
$p_status = 0;
$query = "DELETE from $this->tb1_name2 WHERE c_no=? AND
time_slot=? AND p_date=? AND d_name=? AND p_status=?";
$statement = $this->connection->mysqli_conn->prepare($query)
or die(mysqli_error($this->connection->mysqli_conn));
$statement->bind_param("dsssd", $c_no, $shift, $p_date, $dname,
$p_status) or die(mysqli_error($this->connection->mysqli_conn));
$result = $statement->execute() or
die(mysqli_error($this->connection->mysqli_conn));
print_r(mysqli_affected_rows($statement));
i used above code to delete row in a table and make sure weather the row
is deleted.but it gives following error.
<b>Warning</b>: mysqli_affected_rows() expects parameter 1 to be
mysqli, object given in
<b>/opt/lampp/htdocs/NEW/patient_channel/controller/Patient_controller.php</b>
on line <b>318</b><br />
No comments:
Post a Comment