public function getNextDocumentInfo()
  { 
    $this->createPreparedStatements();
    
    $this->prepared_select_statement->execute();
    $this->prepared_select_statement->bindColumn("document_info", $doc_info, PDO::PARAM_LOB);
    $this->prepared_select_statement->bindColumn("id", $id);
    $row = $this->prepared_select_statement->fetch(PDO::FETCH_BOUND);
    $this->prepared_select_statement->closeCursor();
    
    if ($id == null) 
    {
      return null; 
    }
    
    $this->PDO->exec("DELETE FROM document_infos WHERE id = ".$id.";");
    
    $DocInfo = unserialize($doc_info);

    return $DocInfo;
  }