I'm writing a function to delete one of the users in my database with the following code, how ever the mysqli\_affected\_rows always returns 0 ?

```
$query = "DELETE FROM taxaapp_users WHERE id = $clientId AND grp = $grp";
    $response['errorMsg1'] = $query;
    if (sqlQuery($query)){
        $response['success'] = "testing " . mysqli_affected_rows($con);

    } else {
        $result = sqlQuery("SELECT id FROM ");
        $response['errorMsg'] = "Der er sket en fejl";
    }

function sqlQuery($query) {
    global $con;
    $result = mysqli_query($con,$query);
    return mysqli_query($con, $query);
}

```

The correct user is being deleted when its run, if I change the $clientId to one that does not exist the query still returns true (probably right) and the mysqli\_affected\_rows returns 0 still.