14 DELETE

$stmt = $mysqli -> prepare('DELETE FROM users WHERE id = ?');

$userId = 4;

$stmt -> bind_param(‘i’, $userId);
$stmt -> execute();

// number of deleted rows
echo $stmt -> affected_rows;