Can someone tell me what I'm doing wrong? I cannot get the affected rows returned after a row has been deleted. The function always returns int(0) even though the delete action was preformed. I read where I needed to clear or close the results which I have done but it still does not work. A debug shows this error: Command out of sync. The manual states that to overcome this, $result->free must be used. In my case, it doesn't work.\[code\] $res = db::query("CALL deleteUser('$phone')"); if($res !== 1) { echo 'failed'; } else { echo 'success'; }\[/code\]This is the part of the function where the query does its thing.\[code\] if(self::$instance->query($query) === false){ throw new exception("Failed"); } return self::$instance->affected_rows;\[/code\]