So I have been looking at this code now for many months on and off and get the error mysqli_bind_param() fatal error and assume that a variable is missing or something can anyone offer any help?
public function getItems_paged($startIndex, $numItems) {
    $stmt = mysqli_prepare($this->connection, "SELECT clients.id, clients.fname, clients.lname, clients.sex, clients.country, clients.town, clients.dateofbirth, clients.monthofbirth, clients.yearofbirth
    FROM clients
    ORDER BY id DESC LIMIT ?, ?");
    $this->throwExceptionOnError();
    mysqli_bind_param($stmt, 'ii', $startIndex, $numItems);
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    $rows = array();
    mysqli_stmt_bind_result($stmt, $row->id,$row->fname,$row->lname,$row->sex,$row->country,$row->town,$row->dateofbirth,$row->monthofbirth,$row->yearofbirth);
    while (mysqli_stmt_fetch($stmt)) {
      $row->fname = ucfirst(substr($row->fname,0,1));
      $row->lname = ucfirst($row->lname);
      $row->town = ucfirst($row->town);
      $row->lname = (($row->fname) . " " . ($row->lname));
      $row->yearofbirth = GetAge($row->dateofbirth. '-' .$row->monthofbirth. '-' .$row->yearofbirth);
      $row->Pic_loc = "";
      $row->Pic_loc= "IMAGES/".($row->id)."/image01.jpg";
      $rows[] = $row;
      $row = new stdClass();
      mysqli_stmt_bind_result($stmt, $row->id,$row->fname,$row->lname,$row->sex,$row->country,$row->town,$row->dateofbirth,$row->monthofbirth,$row->yearofbirth);
    }
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    return $rows;
}
 
    